Contract 0x191cf2602Ca2e534c5Ccae7BCBF4C46a704bb949 1

Contract Overview

Lido: wstDOT Token
Balance:
0 GLMR

GLMR Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x1b7be8a0ebba476574606ab73039e9a67b1f8620327243da918902f2fb6589bdWrap28953132023-02-07 3:49:5444 mins ago0x61197065b4fb6a7c685588fb09abd27cae27fbc0 IN  Lido: wstDOT Token0 GLMR0.0090281205
0xb45e31c75dadcf268ff73dcf30c467e5ddf3e83498d444c486a0c61960ef8abeApprove28951882023-02-07 3:24:361 hr 10 mins ago0x55ec4775d21f2fc72643fdc7340b50d001967d43 IN  Lido: wstDOT Token0 GLMR0.0047239115
0x93b2c6c5be35d6a32a597643446b8c41da1845e291ca0847352cb7e4dc81a2e7Wrap28951822023-02-07 3:23:241 hr 11 mins ago0x55ec4775d21f2fc72643fdc7340b50d001967d43 IN  Lido: wstDOT Token0 GLMR0.007358928975
0x7c8cce4b467a36ef96d62e9129946dbadd0cf22aa16505a488536e77b8581800Unwrap28951572023-02-07 3:18:241 hr 16 mins ago0x55ec4775d21f2fc72643fdc7340b50d001967d43 IN  Lido: wstDOT Token0 GLMR0.0087920315
0x4b4a299434ce7ca3f3c7df0466fbe9f9a77cd661645accd89281d9c99b8ba204Unwrap28944792023-02-07 1:01:063 hrs 33 mins ago0x4f2b5981d89a1c60bc73ea23edef2797447b3c17 IN  Lido: wstDOT Token0 GLMR0.0070575995
0x44c9c731ac1f1fe7c83c36cded064ffc5182cffc9d8aa999849819628e0eb614Approve28932102023-02-06 20:43:427 hrs 51 mins ago0x8b85c91c0930158c54c39b653327904f980c466d IN  Lido: wstDOT Token0 GLMR0.0046958975
0xc1d6e8795f7631bc312e521b4974d66f94dcdd842ce62db7ea383b9129a55a1eApprove28931582023-02-06 20:33:188 hrs 1 min ago0x8b85c91c0930158c54c39b653327904f980c466d IN  Lido: wstDOT Token0 GLMR0.0027040615
0x925ce2a0454100afefbfdc37f6c289292f43c7b3a393593734a367f590537871Approve28931542023-02-06 20:32:308 hrs 2 mins ago0x8b85c91c0930158c54c39b653327904f980c466d IN  Lido: wstDOT Token0 GLMR0.0047239115
0xfbacc373afdf9603ecaeec9d49e75209ae3b9841af8fc330066b20124e0b1d1fWrap28931332023-02-06 20:28:128 hrs 6 mins ago0xd6c56f991585bf895d5f8c50c4a105e907b8b58a IN  Lido: wstDOT Token0 GLMR0.0072912525
0x70e88c5376ab469fb2786faac6b0357ab0428a0e50142574a162a14a573c9f79Unwrap28930712023-02-06 20:15:368 hrs 19 mins ago0xd124c140d25e6bc67be05db19946525d9dd37850 IN  Lido: wstDOT Token0 GLMR0.0070575995
0x4a6031292cacb38edacb39894afd2e7a87908720f9398b7c8da5542d6286bff1Approve28930552023-02-06 20:12:248 hrs 22 mins ago0x6fb2dd173c040b8ffbedf762d09cefa130f82a07 IN  Lido: wstDOT Token0 GLMR0.0047239115
0x5f9b66b6e9b1133a52980141ad7e31ddcf15f828560f52b9e2e85794f322231eApprove28923372023-02-06 17:46:0610 hrs 48 mins ago0x2b429f9a9e400db4c7da11173a0cfa31791beedc IN  Lido: wstDOT Token0 GLMR0.0047239115
0x43f40d45ceddc9ebe9730a548de0fc5d1efad29153fcb80747ae57640a985ec2Wrap28923312023-02-06 17:44:5410 hrs 49 mins ago0x2b429f9a9e400db4c7da11173a0cfa31791beedc IN  Lido: wstDOT Token0 GLMR0.0077796705
0x708d8dca0f2f60a64000c46c8f75e79fb66be94a72e66f9b6d6657d2e7251fe6Wrap28922972023-02-06 17:37:5410 hrs 56 mins ago0x2b429f9a9e400db4c7da11173a0cfa31791beedc IN  Lido: wstDOT Token0 GLMR0.0095141025
0x39958f13da9d4d3b468f44426a8606a1cfe1a70e0cc0f241f8bd94e3a81f8b4dApprove28916642023-02-06 15:26:5413 hrs 7 mins ago0xc14836989f19e29ccebb74692f234f4b416544cc IN  Lido: wstDOT Token0 GLMR0.0027040615
0x014da4c2aed87aef22d10715446faed1ec1ee6888e02ebe663fc90e839a3fa58Approve28916622023-02-06 15:26:3013 hrs 8 mins ago0xc14836989f19e29ccebb74692f234f4b416544cc IN  Lido: wstDOT Token0 GLMR0.0047239115
0xfa1bc7b15d5bb41bc9efff83730177ba9507728b1fcbf6ff54f4be195344844eUnwrap28912752023-02-06 14:08:3614 hrs 26 mins ago0xa307d085c232bb4ce29a16ae527681454683b56b IN  Lido: wstDOT Token0 GLMR0.0070575995
0x59e6aa0a794c7d623179930a6be25f41726df011290bcbdf35ffc14ccb5429deApprove28910522023-02-06 13:24:0015 hrs 10 mins ago0x9d1cff7c84b74ac6184d2e4550c98fbef19a9493 IN  Lido: wstDOT Token0 GLMR0.0047239115
0x1584cb5c815d7d16ccde145e42647ce3a8249e095d76b753f188e9660c86f816Wrap28910052023-02-06 13:14:3615 hrs 20 mins ago0x9d1cff7c84b74ac6184d2e4550c98fbef19a9493 IN  Lido: wstDOT Token0 GLMR0.0072936885
0x422544bbb39b53181c47f485b5dc2db698ab5c3db7b2836c90ffaddf7543980bUnwrap28908782023-02-06 12:49:0015 hrs 45 mins ago0xa307d085c232bb4ce29a16ae527681454683b56b IN  Lido: wstDOT Token0 GLMR0.007088194019
0x407aeb16107109bc6bda2a3c8dbea6a297b71941c84b5f647fc7be24bc4fc20cWrap28903752023-02-06 11:07:0017 hrs 27 mins ago0x1df2ec275e6d6911d2c9e590902096563cbdffd6 IN  Lido: wstDOT Token0 GLMR0.0090281205
0x09cb0786abb0042374a3cfaa68489edcff264e8e6063440440d0ca325fe37785Approve28903682023-02-06 11:05:3617 hrs 29 mins ago0x55db0e580a95725cf97368efb15125fb2e94afdb IN  Lido: wstDOT Token0 GLMR0.0047239115
0x72672f15540fad8a0000934e28c42c3ab9a928e080eae9736811966478f1abb5Wrap28903642023-02-06 11:04:4817 hrs 30 mins ago0x55db0e580a95725cf97368efb15125fb2e94afdb IN  Lido: wstDOT Token0 GLMR0.0095153205
0xb9735ccd7abf5f1e3a8b2562b63ab700e7281802f0ffe41b781c8f7f777dd0d3Approve28900642023-02-06 10:03:4818 hrs 31 mins ago0x0ee4de80982cba808133f4771a33f88668ff6d93 IN  Lido: wstDOT Token0 GLMR0.0047239115
0xa0edf62164f39a6e0a957067170e9b514c6dc1a9a76d815f9bf04e8147dc8ccfWrap28894632023-02-06 8:00:2420 hrs 34 mins ago0x71a240f4ff7d2aad954c8c748f5f2f387f5c08df IN  Lido: wstDOT Token0 GLMR0.0072924705
[ Download CSV Export 

OVERVIEW

Lido is the leading liquid staking solution providing a simple and secure way to earn interest on your digital assets.

Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
WstKSM

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 10 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 7 : wstKSM.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "ERC20.sol";
import "IERC20.sol";
import "ILido.sol";

contract WstKSM is ERC20 {
    // LIDO contract
    ILido public LIDO;

    // vKSM precompile
    IERC20 public VKSM;

    // Token decimals
    uint8 internal _decimals;

    /**
     * @param _lido address of the StKSM token to wrap
     */
    constructor(ILido _lido, IERC20 _vKSM, uint8 __decimals) ERC20("Wrapped liquid staked DOT", "wstDOT") {
        require(__decimals > 0, "WSTKSM: INCORRECT_DECIMALS");
        LIDO = _lido;
        VKSM = _vKSM;
        _decimals = __decimals;
    }

    /**
    * @notice Stub fallback for native token, always reverting
    */
    fallback() external {
        revert("WSTKSM: FORBIDDEN");
    }

    /**
     * @return the number of decimals for getting user representation of a token amount.
     */
    function decimals() public view override returns (uint8) {
        return _decimals;
    }

    /**
     * @notice Stake vKSM to stKSM and wrap stKSM to wstKSM
     * @param _vKSMAmount amount of vKSM
     * @return Amount of wstKSM for a given vKSM amount
     */
    function submit(uint256 _vKSMAmount) external returns (uint256) {
        require(_vKSMAmount > 0, "WSTKSM: ZERO_VKSM");
        VKSM.transferFrom(msg.sender, address(this), _vKSMAmount);
        if (VKSM.allowance(address(this), address(LIDO)) < _vKSMAmount) {
            VKSM.approve(address(LIDO), type(uint256).max);
        }
        uint256 shares = LIDO.deposit(_vKSMAmount);
        require(shares > 0, "WSTKSM: ZERO_SHARES");
        _mint(msg.sender, shares);
        return shares;
    }

    /**
     * @notice Wrap stKSM to wstKSM
     * @param _stKSMAmount amount of stKSM
     * @return Amount of wstKSM for a given stKSM amount
     */
    function wrap(uint256 _stKSMAmount) external returns (uint256) {
        require(_stKSMAmount > 0, "WSTKSM: ZERO_STKSM");
        uint256 wstKSMAmount = LIDO.getSharesByPooledKSM(_stKSMAmount);
        require(wstKSMAmount > 0, "WSTKSM: MINT_ZERO_AMOUNT");
        _mint(msg.sender, wstKSMAmount);
        require(LIDO.transferFrom(msg.sender, address(this), _stKSMAmount), "WSTKSM: TRANSFER_FROM_REVERT");
        return wstKSMAmount;
    }

    /**
     * @notice Unwrap wstKSM to stKSM
     * @param _wstKSMAmount amount of wstKSM
     * @return Amount of stKSM for a given wstKSM amount
     */
    function unwrap(uint256 _wstKSMAmount) external returns (uint256) {
        require(_wstKSMAmount > 0, "WSTKSM: ZERO_WSTKSM");
        uint256 stKSMAmount = LIDO.getPooledKSMByShares(_wstKSMAmount);
        require(stKSMAmount > 0, "WSTKSM: BURN_ZERO_AMOUNT");
        _burn(msg.sender, _wstKSMAmount);
        require(LIDO.transfer(msg.sender, stKSMAmount), "WSTKSM: TRANSFER_REVERT");
        return stKSMAmount;
    }

    /**
     * @notice Get amount of wstKSM for a given amount of stKSM
     * @param _stKSMAmount amount of stKSM
     * @return Amount of wstKSM for a given stKSM amount
     */
    function getWstKSMByStKSM(uint256 _stKSMAmount) external view returns (uint256) {
        return LIDO.getSharesByPooledKSM(_stKSMAmount);
    }

    /**
     * @notice Get amount of stKSM for a given amount of wstKSM
     * @param _wstKSMAmount amount of wstKSM
     * @return Amount of stKSM for a given wstKSM amount
     */
    function getStKSMByWstKSM(uint256 _wstKSMAmount) external view returns (uint256) {
        return LIDO.getPooledKSMByShares(_wstKSMAmount);
    }
}

File 2 of 7 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "IERC20.sol";
import "IERC20Metadata.sol";
import "Context.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, IERC20Metadata {
    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 two 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 override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override 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
     * overridden;
     *
     * 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 override 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 3 of 7 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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 4 of 7 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 5 of 7 : Context.sol
// 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;
    }
}

File 6 of 7 : ILido.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "Types.sol";

interface ILido {
    function MAX_ALLOWABLE_DIFFERENCE() external view returns(uint128);

    function deposit(uint256 amount) external returns (uint256);

    function distributeRewards(uint256 totalRewards, uint256 ledgerBalance) external;

    function distributeLosses(uint256 totalLosses, uint256 ledgerBalance) external;

    function getStashAccounts() external view returns (bytes32[] memory);

    function getLedgerAddresses() external view returns (address[] memory);

    function ledgerStake(address ledger) external view returns (uint256);

    function transferFromLedger(uint256 amount, uint256 excess) external;

    function transferFromLedger(uint256 amount) external;

    function transferToLedger(uint256 amount) external;

    function flushStakes() external;

    function findLedger(bytes32 stash) external view returns (address);

    function AUTH_MANAGER() external returns(address);

    function ORACLE_MASTER() external view returns (address);

    function decimals() external view returns (uint8);

    function getPooledKSMByShares(uint256 sharesAmount) external view returns (uint256);

    function getSharesByPooledKSM(uint256 amount) external view returns (uint256);

    function transfer(address recipient, uint256 amount) external returns (bool);

    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
}

File 7 of 7 : Types.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface Types {
    struct Fee{
        uint16 total;
        uint16 operators;
        uint16 developers;
        uint16 treasury;
    }

    struct Stash {
        bytes32 stashAccount;
        uint64  eraId;
    }

    enum LedgerStatus {
        // bonded but not participate in staking
        Idle,
        // participate as nominator
        Nominator,
        // participate as validator
        Validator,
        // not bonded not participate in staking
        None
    }

    struct UnlockingChunk {
        uint128 balance;
        uint64 era;
    }

    struct OracleData {
        bytes32 stashAccount;
        bytes32 controllerAccount;
        LedgerStatus stakeStatus;
        // active part of stash balance
        uint128 activeBalance;
        // locked for stake stash balance.
        uint128 totalBalance;
        // totalBalance = activeBalance + sum(unlocked.balance)
        UnlockingChunk[] unlocking;
        uint32[] claimedRewards;
        // stash account balance. It includes locked (totalBalance) balance assigned
        // to a controller.
        uint128 stashBalance;
        // slashing spans for ledger
        uint32 slashingSpans;
    }

    struct RelaySpec {
        uint16 maxValidatorsPerLedger;
        uint128 minNominatorBalance;
        uint128 ledgerMinimumActiveBalance;
        uint256 maxUnlockingChunks;
    }
}

Settings
{
  "evmVersion": "istanbul",
  "optimizer": {
    "enabled": true,
    "runs": 10
  },
  "libraries": {
    "wstKSM.sol": {}
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[{"internalType":"contract ILido","name":"_lido","type":"address"},{"internalType":"contract IERC20","name":"_vKSM","type":"address"},{"internalType":"uint8","name":"__decimals","type":"uint8"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[],"name":"LIDO","outputs":[{"internalType":"contract ILido","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VKSM","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_wstKSMAmount","type":"uint256"}],"name":"getStKSMByWstKSM","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stKSMAmount","type":"uint256"}],"name":"getWstKSMByStKSM","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_vKSMAmount","type":"uint256"}],"name":"submit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_wstKSMAmount","type":"uint256"}],"name":"unwrap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stKSMAmount","type":"uint256"}],"name":"wrap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506040516200162938038062001629833981016040819052620000349162000211565b604080518082018252601981527f57726170706564206c6971756964207374616b656420444f54000000000000006020808301918252835180850190945260068452651ddcdd1113d560d21b908401528151919291620000979160039162000152565b508051620000ad90600490602084019062000152565b50505060008160ff1611620001085760405162461bcd60e51b815260206004820152601a60248201527f5753544b534d3a20494e434f52524543545f444543494d414c53000000000000604482015260640160405180910390fd5b600580546001600160a01b039485166001600160a01b03199091161790556006805460ff909216600160a01b026001600160a81b03199092169290931691909117179055620002a7565b82805462000160906200026a565b90600052602060002090601f016020900481019282620001845760008555620001cf565b82601f106200019f57805160ff1916838001178555620001cf565b82800160010185558215620001cf579182015b82811115620001cf578251825591602001919060010190620001b2565b50620001dd929150620001e1565b5090565b5b80821115620001dd5760008155600101620001e2565b6001600160a01b03811681146200020e57600080fd5b50565b6000806000606084860312156200022757600080fd5b83516200023481620001f8565b60208501519093506200024781620001f8565b604085015190925060ff811681146200025f57600080fd5b809150509250925092565b600181811c908216806200027f57607f821691505b60208210811415620002a157634e487b7160e01b600052602260045260246000fd5b50919050565b61137280620002b76000396000f3fe608060405234801561001057600080fd5b50600436106100e65760003560e01c806306fdde0314610127578063095ea7b31461014557806318160ddd1461016857806323b872dd1461017a5780632dc517411461018d578063313ce567146101b857806339509351146101d757806370a08231146101ea5780638b21f1701461021357806395d89b4114610226578063a457c2d71461022e578063a88578d614610241578063a9059cbb14610254578063dd62ed3e14610267578063de0e9a3e146102a0578063ea598cb0146102b3578063ea99c2a6146102c6578063f44c7db9146102d9575b60405162461bcd60e51b81526020600482015260116024820152702ba9aa25a9a69d102327a92124a22222a760791b60448201526064015b60405180910390fd5b61012f6102ec565b60405161013c91906110df565b60405180910390f35b610158610153366004611150565b61037e565b604051901515815260200161013c565b6002545b60405190815260200161013c565b61015861018836600461117a565b610394565b6006546101a0906001600160a01b031681565b6040516001600160a01b03909116815260200161013c565b600654600160a01b900460ff1660405160ff909116815260200161013c565b6101586101e5366004611150565b610445565b61016c6101f83660046111b6565b6001600160a01b031660009081526020819052604090205490565b6005546101a0906001600160a01b031681565b61012f61047c565b61015861023c366004611150565b61048b565b61016c61024f3660046111d8565b610526565b610158610262366004611150565b61059b565b61016c6102753660046111f1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61016c6102ae3660046111d8565b6105a8565b61016c6102c13660046111d8565b61076f565b61016c6102d43660046111d8565b61093c565b61016c6102e73660046111d8565b610bb8565b6060600380546102fb90611224565b80601f016020809104026020016040519081016040528092919081815260200182805461032790611224565b80156103745780601f1061034957610100808354040283529160200191610374565b820191906000526020600020905b81548152906001019060200180831161035757829003601f168201915b5050505050905090565b600061038b338484610bea565b50600192915050565b60006103a1848484610d0f565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156104265760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b606482015260840161011e565b61043a85336104358685611275565b610bea565b506001949350505050565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161038b91859061043590869061128c565b6060600480546102fb90611224565b3360009081526001602090815260408083206001600160a01b03861684529091528120548281101561050d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161011e565b61051c33856104358685611275565b5060019392505050565b60055460405163598903f960e11b8152600481018390526000916001600160a01b03169063b31207f2906024015b602060405180830381865afa158015610571573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059591906112a4565b92915050565b600061038b338484610d0f565b60008082116105ef5760405162461bcd60e51b81526020600482015260136024820152725753544b534d3a205a45524f5f5753544b534d60681b604482015260640161011e565b6005546040516363ca402d60e01b8152600481018490526000916001600160a01b0316906363ca402d90602401602060405180830381865afa158015610639573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065d91906112a4565b9050600081116106aa5760405162461bcd60e51b815260206004820152601860248201527715d4d512d4d34e881095549397d6915493d7d05353d5539560421b604482015260640161011e565b6106b43384610ed5565b60055460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906106e690339085906004016112bd565b6020604051808303816000875af1158015610705573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072991906112d6565b6105955760405162461bcd60e51b815260206004820152601760248201527615d4d512d4d34e881514905394d1915497d49155915495604a1b604482015260640161011e565b60008082116107b55760405162461bcd60e51b81526020600482015260126024820152715753544b534d3a205a45524f5f53544b534d60701b604482015260640161011e565b60055460405163598903f960e11b8152600481018490526000916001600160a01b03169063b31207f290602401602060405180830381865afa1580156107ff573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082391906112a4565b9050600081116108705760405162461bcd60e51b815260206004820152601860248201527715d4d512d4d34e881352539517d6915493d7d05353d5539560421b604482015260640161011e565b61087a3382611012565b6005546040516323b872dd60e01b81526001600160a01b03909116906323b872dd906108ae903390309088906004016112f8565b6020604051808303816000875af11580156108cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f191906112d6565b6105955760405162461bcd60e51b815260206004820152601c60248201527b15d4d512d4d34e881514905394d1915497d19493d357d4915591549560221b604482015260640161011e565b60008082116109815760405162461bcd60e51b81526020600482015260116024820152705753544b534d3a205a45524f5f564b534d60781b604482015260640161011e565b6006546040516323b872dd60e01b81526001600160a01b03909116906323b872dd906109b5903390309087906004016112f8565b6020604051808303816000875af11580156109d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f891906112d6565b50600654600554604051636eb1769f60e11b81523060048201526001600160a01b0391821660248201528492919091169063dd62ed3e90604401602060405180830381865afa158015610a4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7391906112a4565b1015610af65760065460055460405163095ea7b360e01b81526001600160a01b039283169263095ea7b392610ab192911690600019906004016112bd565b6020604051808303816000875af1158015610ad0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af491906112d6565b505b60055460405163b6b55f2560e01b8152600481018490526000916001600160a01b03169063b6b55f25906024016020604051808303816000875af1158015610b42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6691906112a4565b905060008111610bae5760405162461bcd60e51b81526020600482015260136024820152725753544b534d3a205a45524f5f53484152455360681b604482015260640161011e565b6105953382611012565b6005546040516363ca402d60e01b8152600481018390526000916001600160a01b0316906363ca402d90602401610554565b6001600160a01b038316610c4c5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161011e565b6001600160a01b038216610cad5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161011e565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038316610d735760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161011e565b6001600160a01b038216610dd55760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161011e565b6001600160a01b03831660009081526020819052604090205481811015610e4d5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161011e565b610e578282611275565b6001600160a01b038086166000908152602081905260408082209390935590851681529081208054849290610e8d90849061128c565b92505081905550826001600160a01b0316846001600160a01b031660008051602061131d83398151915284604051610ec791815260200190565b60405180910390a350505050565b6001600160a01b038216610f355760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161011e565b6001600160a01b03821660009081526020819052604090205481811015610fa95760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161011e565b610fb38282611275565b6001600160a01b03841660009081526020819052604081209190915560028054849290610fe1908490611275565b90915550506040518281526000906001600160a01b0385169060008051602061131d83398151915290602001610d02565b6001600160a01b0382166110685760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161011e565b806002600082825461107a919061128c565b90915550506001600160a01b038216600090815260208190526040812080548392906110a790849061128c565b90915550506040518181526001600160a01b0383169060009060008051602061131d8339815191529060200160405180910390a35050565b600060208083528351808285015260005b8181101561110c578581018301518582016040015282016110f0565b8181111561111e576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461114b57600080fd5b919050565b6000806040838503121561116357600080fd5b61116c83611134565b946020939093013593505050565b60008060006060848603121561118f57600080fd5b61119884611134565b92506111a660208501611134565b9150604084013590509250925092565b6000602082840312156111c857600080fd5b6111d182611134565b9392505050565b6000602082840312156111ea57600080fd5b5035919050565b6000806040838503121561120457600080fd5b61120d83611134565b915061121b60208401611134565b90509250929050565b600181811c9082168061123857607f821691505b6020821081141561125957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000828210156112875761128761125f565b500390565b6000821982111561129f5761129f61125f565b500190565b6000602082840312156112b657600080fd5b5051919050565b6001600160a01b03929092168252602082015260400190565b6000602082840312156112e857600080fd5b815180151581146111d157600080fd5b6001600160a01b03938416815291909216602082015260408101919091526060019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122014ddd8bdd8e166f05e7d248a0f422992090bc1af668239b5cadf8a0a220aa32064736f6c634300080a0033000000000000000000000000fa36fe1da08c89ec72ea1f0143a35bfd5daea108000000000000000000000000ffffffff1fcacbd218edc0eba20fc2308c778080000000000000000000000000000000000000000000000000000000000000000a

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000fa36fe1da08c89ec72ea1f0143a35bfd5daea108000000000000000000000000ffffffff1fcacbd218edc0eba20fc2308c778080000000000000000000000000000000000000000000000000000000000000000a

-----Decoded View---------------
Arg [0] : _lido (address): 0xfa36fe1da08c89ec72ea1f0143a35bfd5daea108
Arg [1] : _vKSM (address): 0xffffffff1fcacbd218edc0eba20fc2308c778080
Arg [2] : __decimals (uint8): 10

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000fa36fe1da08c89ec72ea1f0143a35bfd5daea108
Arg [1] : 000000000000000000000000ffffffff1fcacbd218edc0eba20fc2308c778080
Arg [2] : 000000000000000000000000000000000000000000000000000000000000000a


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.