Address Details
contract

0x43f93BDf05adA09EE051090F054925D4e70F2DBf

Contract Name
StakingHelper
Creator
0x4bec32–bac54d at 0xdbdea0–cc9c56
Balance
0 CELO ( )
Locked CELO Balance
0.00 CELO
Voting CELO Balance
0.00 CELO
Pending Unlocked Gold
0.00 CELO
Tokens
Fetching tokens...
Transactions
Fetching transactions...
Transfers
Fetching transfers...
Gas Used
Fetching gas used...
Last Balance Update
9088940
This contract has been verified via Sourcify. View contract in Sourcify repository
Contract name:
StakingHelper




Optimization enabled
false
Compiler version
v0.7.5+commit.eb77ed08




EVM Version
istanbul




Verified at
2022-08-21T21:06:30.084397Z

StakingHelper.sol

// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;


interface IERC20 {
    function decimals() external view returns (uint8);
  /**
   * @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);
}

interface IStaking {
    function stake( uint _amount, address _recipient ) external returns ( bool );
    function claim( address _recipient ) external;
}

contract StakingHelper {

    address public immutable staking;
    address public immutable IMMO;

    constructor ( address _staking, address _IMMO ) {
        require( _staking != address(0) );
        staking = _staking;
        require( _IMMO != address(0) );
        IMMO = _IMMO;
    }

    function stake( uint _amount, address _recipient ) external {
        IERC20( IMMO ).transferFrom( msg.sender, address(this), _amount );
        IERC20( IMMO ).approve( staking, _amount );
        IStaking( staking ).stake( _amount, _recipient );
        IStaking( staking ).claim( _recipient );
    }
}
        

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_staking","internalType":"address"},{"type":"address","name":"_IMMO","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"IMMO","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"stake","inputs":[{"type":"uint256","name":"_amount","internalType":"uint256"},{"type":"address","name":"_recipient","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"staking","inputs":[]}]
              

Contract Creation Code

0x60c060405234801561001057600080fd5b506040516106373803806106378339818101604052604081101561003357600080fd5b810190808051906020019092919080519060200190929190505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561008857600080fd5b8173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b81525050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156100f957600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b81525050505060805160601c60a05160601c6104c46101736000398060fe52806101465280610231525080610122528061026d528061031e52806103eb52506104c46000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063025de6cd146100465780634cf088d91461007a5780637acb7757146100ae575b600080fd5b61004e6100fc565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610082610120565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100fa600480360360408110156100c457600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610144565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156101f357600080fd5b505af1158015610207573d6000803e3d6000fd5b505050506040513d602081101561021d57600080fd5b8101908080519060200190929190505050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663095ea7b37f0000000000000000000000000000000000000000000000000000000000000000846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156102e057600080fd5b505af11580156102f4573d6000803e3d6000fd5b505050506040513d602081101561030a57600080fd5b8101908080519060200190929190505050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637acb775783836040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156103ad57600080fd5b505af11580156103c1573d6000803e3d6000fd5b505050506040513d60208110156103d757600080fd5b8101908080519060200190929190505050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631e83409a826040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15801561047257600080fd5b505af1158015610486573d6000803e3d6000fd5b50505050505056fea264697066735822122047d03cf73faf41032c77a7889af82601534cb1e192fcf47d55a3bb0b6f8bcbae64736f6c63430007050033000000000000000000000000aea9fdca2225660019779ca25fd511cf540764d6000000000000000000000000809d32d6d311a44d14da2c1473fa992ae57974d7

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063025de6cd146100465780634cf088d91461007a5780637acb7757146100ae575b600080fd5b61004e6100fc565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610082610120565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100fa600480360360408110156100c457600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610144565b005b7f000000000000000000000000809d32d6d311a44d14da2c1473fa992ae57974d781565b7f000000000000000000000000aea9fdca2225660019779ca25fd511cf540764d681565b7f000000000000000000000000809d32d6d311a44d14da2c1473fa992ae57974d773ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156101f357600080fd5b505af1158015610207573d6000803e3d6000fd5b505050506040513d602081101561021d57600080fd5b8101908080519060200190929190505050507f000000000000000000000000809d32d6d311a44d14da2c1473fa992ae57974d773ffffffffffffffffffffffffffffffffffffffff1663095ea7b37f000000000000000000000000aea9fdca2225660019779ca25fd511cf540764d6846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156102e057600080fd5b505af11580156102f4573d6000803e3d6000fd5b505050506040513d602081101561030a57600080fd5b8101908080519060200190929190505050507f000000000000000000000000aea9fdca2225660019779ca25fd511cf540764d673ffffffffffffffffffffffffffffffffffffffff16637acb775783836040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156103ad57600080fd5b505af11580156103c1573d6000803e3d6000fd5b505050506040513d60208110156103d757600080fd5b8101908080519060200190929190505050507f000000000000000000000000aea9fdca2225660019779ca25fd511cf540764d673ffffffffffffffffffffffffffffffffffffffff16631e83409a826040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15801561047257600080fd5b505af1158015610486573d6000803e3d6000fd5b50505050505056fea264697066735822122047d03cf73faf41032c77a7889af82601534cb1e192fcf47d55a3bb0b6f8bcbae64736f6c63430007050033