GLMR Price: $0.019108 (-7.50%)

Contract

0xe11BF2fDA23bF0A98365e1A4c04A87C9339e8687

Overview

GLMR Balance

Moonbeam Chain LogoMoonbeam Chain LogoMoonbeam Chain Logo0 GLMR

GLMR Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Transfer With Re...24443472022-12-05 11:38:481151 days ago1670240328IN
0xe11BF2fD...9339e8687
1 GLMR0.00685987101.5

Latest 2 internal transactions

Parent Transaction Hash Block From To
24443472022-12-05 11:38:481151 days ago1670240328
0xe11BF2fD...9339e8687
1 GLMR
24154902022-12-01 10:02:181155 days ago1669888938  Contract Creation0 GLMR
Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
EthereumFeeProxy

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import '@openzeppelin/contracts/security/ReentrancyGuard.sol';

/**
 * @title EthereumFeeProxy
 * @notice This contract performs an Ethereum transfer with a Fee sent to a third address and stores a reference
 */
contract EthereumFeeProxy is ReentrancyGuard {
  // Event to declare a transfer with a reference
  event TransferWithReferenceAndFee(
    address to,
    uint256 amount,
    bytes indexed paymentReference,
    uint256 feeAmount,
    address feeAddress
  );

  // Fallback function returns funds to the sender
  receive() external payable {
    revert('not payable receive');
  }

  /**
   * @notice Performs an Ethereum transfer with a reference
   * @param _to Transfer recipient
   * @param _paymentReference Reference of the payment related
   * @param _feeAmount The amount of the payment fee (part of the msg.value)
   * @param _feeAddress The fee recipient
   */
  function transferWithReferenceAndFee(
    address payable _to,
    bytes calldata _paymentReference,
    uint256 _feeAmount,
    address payable _feeAddress
  ) external payable {
    transferExactEthWithReferenceAndFee(
      _to,
      msg.value - _feeAmount,
      _paymentReference,
      _feeAmount,
      _feeAddress
    );
  }

  /**
   * @notice Performs an Ethereum transfer with a reference with an exact amount of eth
   * @param _to Transfer recipient
   * @param _amount Amount to transfer
   * @param _paymentReference Reference of the payment related
   * @param _feeAmount The amount of the payment fee (part of the msg.value)
   * @param _feeAddress The fee recipient
   */
  function transferExactEthWithReferenceAndFee(
    address payable _to,
    uint256 _amount,
    bytes calldata _paymentReference,
    uint256 _feeAmount,
    address payable _feeAddress
  ) public payable nonReentrant {
    (bool sendSuccess, ) = _to.call{value: _amount}('');
    require(sendSuccess, 'Could not pay the recipient');

    _feeAddress.transfer(_feeAmount);

    // transfer the remaining ethers to the sender
    (bool sendBackSuccess, ) = payable(msg.sender).call{value: msg.value - _amount - _feeAmount}(
      ''
    );
    require(sendBackSuccess, 'Could not send remaining funds to the payer');

    emit TransferWithReferenceAndFee(_to, _amount, _paymentReference, _feeAmount, _feeAddress);
  }
}

File 2 of 2 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

Settings
{
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"bytes","name":"paymentReference","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"feeAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"feeAddress","type":"address"}],"name":"TransferWithReferenceAndFee","type":"event"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes","name":"_paymentReference","type":"bytes"},{"internalType":"uint256","name":"_feeAmount","type":"uint256"},{"internalType":"address payable","name":"_feeAddress","type":"address"}],"name":"transferExactEthWithReferenceAndFee","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"},{"internalType":"bytes","name":"_paymentReference","type":"bytes"},{"internalType":"uint256","name":"_feeAmount","type":"uint256"},{"internalType":"address payable","name":"_feeAddress","type":"address"}],"name":"transferWithReferenceAndFee","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b50600160008190555061091f806100286000396000f3fe60806040526004361061002d5760003560e01c8063b868980b14610072578063d7c95e981461008e5761006d565b3661006d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161006490610391565b60405180910390fd5b600080fd5b61008c600480360381019061008791906104b4565b6100aa565b005b6100a860048036038101906100a3919061053c565b6100ca565b005b6100c38583346100ba9190610605565b868686866100ca565b5050505050565b60026000541415610110576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161010790610685565b60405180910390fd5b600260008190555060008673ffffffffffffffffffffffffffffffffffffffff168660405161013e906106d6565b60006040518083038185875af1925050503d806000811461017b576040519150601f19603f3d011682016040523d82523d6000602084013e610180565b606091505b50509050806101c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101bb90610737565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f1935050505015801561020a573d6000803e3d6000fd5b5060003373ffffffffffffffffffffffffffffffffffffffff168488346102319190610605565b61023b9190610605565b604051610247906106d6565b60006040518083038185875af1925050503d8060008114610284576040519150601f19603f3d011682016040523d82523d6000602084013e610289565b606091505b50509050806102cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c4906107c9565b60405180910390fd5b85856040516102dd92919061081d565b60405180910390207fa1c241e337c4610a9d0f881111e977e9dc8690c85fe2108897bb1483c66e6a968989878760405161031a94939291906108a4565b60405180910390a250506001600081905550505050505050565b600082825260208201905092915050565b7f6e6f742070617961626c65207265636569766500000000000000000000000000600082015250565b600061037b601383610334565b915061038682610345565b602082019050919050565b600060208201905081810360008301526103aa8161036e565b9050919050565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006103e6826103bb565b9050919050565b6103f6816103db565b811461040157600080fd5b50565b600081359050610413816103ed565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261043e5761043d610419565b5b8235905067ffffffffffffffff81111561045b5761045a61041e565b5b60208301915083600182028301111561047757610476610423565b5b9250929050565b6000819050919050565b6104918161047e565b811461049c57600080fd5b50565b6000813590506104ae81610488565b92915050565b6000806000806000608086880312156104d0576104cf6103b1565b5b60006104de88828901610404565b955050602086013567ffffffffffffffff8111156104ff576104fe6103b6565b5b61050b88828901610428565b9450945050604061051e8882890161049f565b925050606061052f88828901610404565b9150509295509295909350565b60008060008060008060a08789031215610559576105586103b1565b5b600061056789828a01610404565b965050602061057889828a0161049f565b955050604087013567ffffffffffffffff811115610599576105986103b6565b5b6105a589828a01610428565b945094505060606105b889828a0161049f565b92505060806105c989828a01610404565b9150509295509295509295565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006106108261047e565b915061061b8361047e565b92508282101561062e5761062d6105d6565b5b828203905092915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b600061066f601f83610334565b915061067a82610639565b602082019050919050565b6000602082019050818103600083015261069e81610662565b9050919050565b600081905092915050565b50565b60006106c06000836106a5565b91506106cb826106b0565b600082019050919050565b60006106e1826106b3565b9150819050919050565b7f436f756c64206e6f74207061792074686520726563697069656e740000000000600082015250565b6000610721601b83610334565b915061072c826106eb565b602082019050919050565b6000602082019050818103600083015261075081610714565b9050919050565b7f436f756c64206e6f742073656e642072656d61696e696e672066756e6473207460008201527f6f20746865207061796572000000000000000000000000000000000000000000602082015250565b60006107b3602b83610334565b91506107be82610757565b604082019050919050565b600060208201905081810360008301526107e2816107a6565b9050919050565b82818337600083830152505050565b600061080483856106a5565b93506108118385846107e9565b82840190509392505050565b600061082a8284866107f8565b91508190509392505050565b6000819050919050565b600061085b610856610851846103bb565b610836565b6103bb565b9050919050565b600061086d82610840565b9050919050565b600061087f82610862565b9050919050565b61088f81610874565b82525050565b61089e8161047e565b82525050565b60006080820190506108b96000830187610886565b6108c66020830186610895565b6108d36040830185610895565b6108e06060830184610886565b9594505050505056fea2646970667358221220c6c0a6d1678f97752cd566ebf3a8613b60208f5f9b5d614959cb87aec29808d564736f6c63430008090033

Deployed Bytecode

0x60806040526004361061002d5760003560e01c8063b868980b14610072578063d7c95e981461008e5761006d565b3661006d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161006490610391565b60405180910390fd5b600080fd5b61008c600480360381019061008791906104b4565b6100aa565b005b6100a860048036038101906100a3919061053c565b6100ca565b005b6100c38583346100ba9190610605565b868686866100ca565b5050505050565b60026000541415610110576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161010790610685565b60405180910390fd5b600260008190555060008673ffffffffffffffffffffffffffffffffffffffff168660405161013e906106d6565b60006040518083038185875af1925050503d806000811461017b576040519150601f19603f3d011682016040523d82523d6000602084013e610180565b606091505b50509050806101c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101bb90610737565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f1935050505015801561020a573d6000803e3d6000fd5b5060003373ffffffffffffffffffffffffffffffffffffffff168488346102319190610605565b61023b9190610605565b604051610247906106d6565b60006040518083038185875af1925050503d8060008114610284576040519150601f19603f3d011682016040523d82523d6000602084013e610289565b606091505b50509050806102cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c4906107c9565b60405180910390fd5b85856040516102dd92919061081d565b60405180910390207fa1c241e337c4610a9d0f881111e977e9dc8690c85fe2108897bb1483c66e6a968989878760405161031a94939291906108a4565b60405180910390a250506001600081905550505050505050565b600082825260208201905092915050565b7f6e6f742070617961626c65207265636569766500000000000000000000000000600082015250565b600061037b601383610334565b915061038682610345565b602082019050919050565b600060208201905081810360008301526103aa8161036e565b9050919050565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006103e6826103bb565b9050919050565b6103f6816103db565b811461040157600080fd5b50565b600081359050610413816103ed565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261043e5761043d610419565b5b8235905067ffffffffffffffff81111561045b5761045a61041e565b5b60208301915083600182028301111561047757610476610423565b5b9250929050565b6000819050919050565b6104918161047e565b811461049c57600080fd5b50565b6000813590506104ae81610488565b92915050565b6000806000806000608086880312156104d0576104cf6103b1565b5b60006104de88828901610404565b955050602086013567ffffffffffffffff8111156104ff576104fe6103b6565b5b61050b88828901610428565b9450945050604061051e8882890161049f565b925050606061052f88828901610404565b9150509295509295909350565b60008060008060008060a08789031215610559576105586103b1565b5b600061056789828a01610404565b965050602061057889828a0161049f565b955050604087013567ffffffffffffffff811115610599576105986103b6565b5b6105a589828a01610428565b945094505060606105b889828a0161049f565b92505060806105c989828a01610404565b9150509295509295509295565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006106108261047e565b915061061b8361047e565b92508282101561062e5761062d6105d6565b5b828203905092915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b600061066f601f83610334565b915061067a82610639565b602082019050919050565b6000602082019050818103600083015261069e81610662565b9050919050565b600081905092915050565b50565b60006106c06000836106a5565b91506106cb826106b0565b600082019050919050565b60006106e1826106b3565b9150819050919050565b7f436f756c64206e6f74207061792074686520726563697069656e740000000000600082015250565b6000610721601b83610334565b915061072c826106eb565b602082019050919050565b6000602082019050818103600083015261075081610714565b9050919050565b7f436f756c64206e6f742073656e642072656d61696e696e672066756e6473207460008201527f6f20746865207061796572000000000000000000000000000000000000000000602082015250565b60006107b3602b83610334565b91506107be82610757565b604082019050919050565b600060208201905081810360008301526107e2816107a6565b9050919050565b82818337600083830152505050565b600061080483856106a5565b93506108118385846107e9565b82840190509392505050565b600061082a8284866107f8565b91508190509392505050565b6000819050919050565b600061085b610856610851846103bb565b610836565b6103bb565b9050919050565b600061086d82610840565b9050919050565b600061087f82610862565b9050919050565b61088f81610874565b82525050565b61089e8161047e565b82525050565b60006080820190506108b96000830187610886565b6108c66020830186610895565b6108d36040830185610895565b6108e06060830184610886565b9594505050505056fea2646970667358221220c6c0a6d1678f97752cd566ebf3a8613b60208f5f9b5d614959cb87aec29808d564736f6c63430008090033

Block Transaction Gas Used Reward
view all blocks collator

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ 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.