0%
    Verified
  • Verified, Router
  • Router

The following smart contract is called GasMovr, which is an Ethereum-based contract that allows users to deposit and withdraw native tokens across different chains. It includes functions for depositing and withdrawing tokens, setting chain configurations, and granting/rejecting sender roles. The contract also includes a batch send function for sending tokens to multiple addresses at once. The contract is Ownable and Pausable, and uses OpenZeppelin libraries for access control and security.

0xb584d4be1a5470ca1a8778e9b86c81e165204599
Copied
Copied
GasMovr Source Code
// SPDX-License-Identifier: MIT pragma solidity >0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; contract GasMovr is Ownable, Pausable { /* Variables */ mapping(uint256 => ChainData) public chainConfig; mapping(bytes32 => bool) public processedHashes; mapping(address => bool) public senders; struct ChainData { uint256 chainId; bool isEnabled; } /* Events */ event Deposit( address indexed destinationReceiver, uint256 amount, uint256 indexed destinationChainId ); event Withdrawal(address indexed receiver, uint256 amount); event Donation(address sender, uint256 amount); event Send(address receiver, uint256 amount, bytes32 srcChainTxHash); event GrantSender(address sender); event RevokeSender(address sender); modifier onlySender() { require(senders[msg.sender], "Sender role required"); _; } constructor() { _grantSenderRole(msg.sender); } receive() external payable { emit Donation(msg.sender, msg.value); } function depositNativeToken(uint256 destinationChainId, address _to) public payable whenNotPaused { require( chainConfig[destinationChainId].isEnabled, "Chain is currently disabled" ); emit Deposit(_to, msg.value, destinationChainId); } function withdrawBalance(address _to, uint256 _amount) public onlyOwner { _withdrawBalance(_to, _amount); } function withdrawFullBalance(address _to) public onlyOwner { _withdrawBalance(_to, address(this).balance); } function _withdrawBalance(address _to, uint256 _amount) private { (bool success, ) = _to.call{value: _amount}(""); require(success, "Failed to send Ether"); emit Withdrawal(_to, _amount); } function setIsEnabled(uint256 chainId, bool _isEnabled) public onlyOwner returns (bool) { chainConfig[chainId].isEnabled = _isEnabled; return chainConfig[chainId].isEnabled; } function setPause() public onlyOwner returns (bool) { _pause(); return paused(); } function setUnPause() public onlyOwner returns (bool) { _unpause(); return paused(); } function addRoutes(ChainData[] calldata _routes) external onlyOwner { for (uint256 i = 0; i < _routes.length; i++) { chainConfig[_routes[i].chainId] = _routes[i]; } } function getChainData(uint256 chainId) public view returns (ChainData memory) { return (chainConfig[chainId]); } function batchSendNativeToken( address payable[] memory receivers, uint256[] memory amounts, bytes32[] memory srcChainTxHashes, uint256 perUserGasAmount, uint256 maxLimit ) public onlySender { require( receivers.length == amounts.length &amp;&amp; receivers.length == srcChainTxHashes.length, "Input length mismatch" ); uint256 gasPrice; assembly { gasPrice := gasprice() } for (uint256 i = 0; i < receivers.length; i++) { uint256 _gasFees = amounts[i] > maxLimit ? (amounts[i] - maxLimit + (gasPrice * perUserGasAmount)) : gasPrice * perUserGasAmount; _sendNativeToken( receivers[i], amounts[i], srcChainTxHashes[i], _gasFees ); } } function sendNativeToken( address payable receiver, uint256 amount, bytes32 srcChainTxHash, uint256 perUserGasAmount, uint256 maxLimit ) public onlySender { uint256 gasPrice; assembly { gasPrice := gasprice() } uint256 _gasFees = amount > maxLimit ? (amount - maxLimit + (gasPrice * perUserGasAmount)) : gasPrice * perUserGasAmount; _sendNativeToken(receiver, amount, srcChainTxHash, _gasFees); } function _sendNativeToken( address payable receiver, uint256 amount, bytes32 srcChainTxHash, uint256 gasFees ) private { if (processedHashes[srcChainTxHash]) return; processedHashes[srcChainTxHash] = true; uint256 sendAmount = amount - gasFees; emit Send(receiver, sendAmount, srcChainTxHash); (bool success, ) = receiver.call{value: sendAmount, gas: 5000}(""); require(success, "Failed to send Ether"); } function grantSenderRole(address sender) public onlyOwner { _grantSenderRole(sender); } function revokeSenderRole(address sender) public onlyOwner { _revokeSenderRole(sender); } function _grantSenderRole(address sender) private { senders[sender] = true; emit GrantSender(sender); } function _revokeSenderRole(address sender) private { senders[sender] = false; emit RevokeSender(sender); } } // SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } } // SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Context.sol) 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) { return msg.data; } }
GasMovr ABI
Copied
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"destinationReceiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"destinationChainId","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Donation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"}],"name":"GrantSender","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"}],"name":"RevokeSender","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"srcChainTxHash","type":"bytes32"}],"name":"Send","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawal","type":"event"},{"inputs":[{"components":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"bool","name":"isEnabled","type":"bool"}],"internalType":"struct GasMovr.ChainData[]","name":"_routes","type":"tuple[]"}],"name":"addRoutes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable[]","name":"receivers","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes32[]","name":"srcChainTxHashes","type":"bytes32[]"},{"internalType":"uint256","name":"perUserGasAmount","type":"uint256"},{"internalType":"uint256","name":"maxLimit","type":"uint256"}],"name":"batchSendNativeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"chainConfig","outputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"bool","name":"isEnabled","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"depositNativeToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"getChainData","outputs":[{"components":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"bool","name":"isEnabled","type":"bool"}],"internalType":"struct GasMovr.ChainData","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"grantSenderRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"processedHashes","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"revokeSenderRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"srcChainTxHash","type":"bytes32"},{"internalType":"uint256","name":"perUserGasAmount","type":"uint256"},{"internalType":"uint256","name":"maxLimit","type":"uint256"}],"name":"sendNativeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"senders","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"bool","name":"_isEnabled","type":"bool"}],"name":"setIsEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setPause","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setUnPause","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"withdrawFullBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
GasMovr Bytecode
Copied
60806040523480156200001157600080fd5b5062000032620000266200006360201b60201c565b6200006b60201b60201c565b60008060146101000a81548160ff0219169083151502179055506200005d336200012f60201b60201c565b62000225565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f81cdda5c32462d3b8852fb6c30821f5d90c45230475e9b29e517afa5fef7eb9a81604051620001b89190620001d4565b60405180910390a150565b620001ce81620001f1565b82525050565b6000602082019050620001eb6000830184620001c3565b92915050565b6000620001fe8262000205565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b61267480620002356000396000f3fe6080604052600436106101185760003560e01c80638da5cb5b116100a0578063c537a1b111610064578063c537a1b1146103f2578063d1c85e8c1461041d578063d431b1ac14610446578063e56461ad14610471578063f2fde38b1461048d57610158565b80638da5cb5b146102fb578063982fb9d8146103265780639a21c64c14610363578063aeb45f011461038c578063b659e774146103c957610158565b80633a8ee97d116100e75780633a8ee97d1461022a5780634c9ef2f8146102535780635c975abb14610290578063715018a6146102bb57806385d9ef5a146102d257610158565b806307d9c5341461015d5780630a70b0561461019a5780630cf20cc9146101d85780630ddedd841461020157610158565b36610158577f5d8bc849764969eb1bcc6d0a2f55999d0167c1ccec240a4f39cf664ca9c4148e333460405161014e929190611e1b565b60405180910390a1005b600080fd5b34801561016957600080fd5b50610184600480360381019061017f9190611b17565b6104b6565b6040516101919190611e44565b60405180910390f35b3480156101a657600080fd5b506101c160048036038101906101bc9190611b40565b6104d6565b6040516101cf929190611f95565b60405180910390f35b3480156101e457600080fd5b506101ff60048036038101906101fa91906119d7565b610507565b005b34801561020d57600080fd5b5061022860048036038101906102239190611a13565b610591565b005b34801561023657600080fd5b50610251600480360381019061024c9190611937565b610827565b005b34801561025f57600080fd5b5061027a60048036038101906102759190611ba5565b6108af565b6040516102879190611e44565b60405180910390f35b34801561029c57600080fd5b506102a5610987565b6040516102b29190611e44565b60405180910390f35b3480156102c757600080fd5b506102d061099d565b005b3480156102de57600080fd5b506102f960048036038101906102f49190611937565b610a25565b005b34801561030757600080fd5b50610310610aad565b60405161031d9190611dc9565b60405180910390f35b34801561033257600080fd5b5061034d60048036038101906103489190611937565b610ad6565b60405161035a9190611e44565b60405180910390f35b34801561036f57600080fd5b5061038a60048036038101906103859190611937565b610af6565b005b34801561039857600080fd5b506103b360048036038101906103ae9190611b40565b610b7f565b6040516103c09190611f5f565b60405180910390f35b3480156103d557600080fd5b506103f060048036038101906103eb9190611ad2565b610bd1565b005b3480156103fe57600080fd5b50610407610d16565b6040516104149190611e44565b60405180910390f35b34801561042957600080fd5b50610444600480360381019061043f9190611960565b610da9565b005b34801561045257600080fd5b5061045b610e8e565b6040516104689190611e44565b60405180910390f35b61048b60048036038101906104869190611b69565b610f21565b005b34801561049957600080fd5b506104b460048036038101906104af9190611937565b61101f565b005b60026020528060005260406000206000915054906101000a900460ff1681565b60016020528060005260406000206000915090508060000154908060010160009054906101000a900460ff16905082565b61050f611117565b73ffffffffffffffffffffffffffffffffffffffff1661052d610aad565b73ffffffffffffffffffffffffffffffffffffffff1614610583576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161057a90611f1f565b60405180910390fd5b61058d828261111f565b5050565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661061d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161061490611e5f565b60405180910390fd5b8351855114801561062f575082518551145b61066e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161066590611f3f565b60405180910390fd5b60003a905060005b865181101561081e576000838783815181106106bb577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151116106d95784836106d491906120d9565b61073c565b84836106e591906120d9565b8488848151811061071f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516107319190612133565b61073b9190612083565b5b905061080a88838151811061077a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101518884815181106107bb577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101518885815181106107fc577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101518461121e565b5080806108169061229c565b915050610676565b50505050505050565b61082f611117565b73ffffffffffffffffffffffffffffffffffffffff1661084d610aad565b73ffffffffffffffffffffffffffffffffffffffff16146108a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089a90611f1f565b60405180910390fd5b6108ac8161137a565b50565b60006108b9611117565b73ffffffffffffffffffffffffffffffffffffffff166108d7610aad565b73ffffffffffffffffffffffffffffffffffffffff161461092d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092490611f1f565b60405180910390fd5b816001600085815260200190815260200160002060010160006101000a81548160ff0219169083151502179055506001600084815260200190815260200160002060010160009054906101000a900460ff16905092915050565b60008060149054906101000a900460ff16905090565b6109a5611117565b73ffffffffffffffffffffffffffffffffffffffff166109c3610aad565b73ffffffffffffffffffffffffffffffffffffffff1614610a19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1090611f1f565b60405180910390fd5b610a23600061140c565b565b610a2d611117565b73ffffffffffffffffffffffffffffffffffffffff16610a4b610aad565b73ffffffffffffffffffffffffffffffffffffffff1614610aa1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a9890611f1f565b60405180910390fd5b610aaa816114d0565b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60036020528060005260406000206000915054906101000a900460ff1681565b610afe611117565b73ffffffffffffffffffffffffffffffffffffffff16610b1c610aad565b73ffffffffffffffffffffffffffffffffffffffff1614610b72576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6990611f1f565b60405180910390fd5b610b7c814761111f565b50565b610b876116a6565b60016000838152602001908152602001600020604051806040016040529081600082015481526020016001820160009054906101000a900460ff1615151515815250509050919050565b610bd9611117565b73ffffffffffffffffffffffffffffffffffffffff16610bf7610aad565b73ffffffffffffffffffffffffffffffffffffffff1614610c4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c4490611f1f565b60405180910390fd5b60005b82829050811015610d1157828282818110610c94577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506040020160016000858585818110610cd7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9050604002016000013581526020019081526020016000208181610cfb919061259a565b9050508080610d099061229c565b915050610c50565b505050565b6000610d20611117565b73ffffffffffffffffffffffffffffffffffffffff16610d3e610aad565b73ffffffffffffffffffffffffffffffffffffffff1614610d94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8b90611f1f565b60405180910390fd5b610d9c611562565b610da4610987565b905090565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610e35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e2c90611e5f565b60405180910390fd5b60003a90506000828611610e54578382610e4f91906120d9565b610e77565b8382610e6091906120d9565b8387610e6c9190612133565b610e769190612083565b5b9050610e858787878461121e565b50505050505050565b6000610e98611117565b73ffffffffffffffffffffffffffffffffffffffff16610eb6610aad565b73ffffffffffffffffffffffffffffffffffffffff1614610f0c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0390611f1f565b60405180910390fd5b610f14611603565b610f1c610987565b905090565b610f29610987565b15610f69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6090611eff565b60405180910390fd5b6001600083815260200190815260200160002060010160009054906101000a900460ff16610fcc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fc390611e9f565b60405180910390fd5b818173ffffffffffffffffffffffffffffffffffffffff167f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15346040516110139190611f7a565b60405180910390a35050565b611027611117565b73ffffffffffffffffffffffffffffffffffffffff16611045610aad565b73ffffffffffffffffffffffffffffffffffffffff161461109b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109290611f1f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561110b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161110290611ebf565b60405180910390fd5b6111148161140c565b50565b600033905090565b60008273ffffffffffffffffffffffffffffffffffffffff168260405161114590611db4565b60006040518083038185875af1925050503d8060008114611182576040519150601f19603f3d011682016040523d82523d6000602084013e611187565b606091505b50509050806111cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111c290611edf565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65836040516112119190611f7a565b60405180910390a2505050565b6002600083815260200190815260200160002060009054906101000a900460ff161561124957611374565b60016002600084815260200190815260200160002060006101000a81548160ff021916908315150217905550600081846112839190612133565b90507f2f824f69f211e444df15d741157e83cdf23c50f39399b9523853a84b91379ca68582856040516112b893929190611de4565b60405180910390a160008573ffffffffffffffffffffffffffffffffffffffff1682611388906040516112ea90611db4565b600060405180830381858888f193505050503d8060008114611328576040519150601f19603f3d011682016040523d82523d6000602084013e61132d565b606091505b5050905080611371576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161136890611edf565b60405180910390fd5b50505b50505050565b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f81cdda5c32462d3b8852fb6c30821f5d90c45230475e9b29e517afa5fef7eb9a816040516114019190611dc9565b60405180910390a150565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f6d976a532ca2d9b73b2090e0fb183da92b74bfd91ca6f4562b82a86c0a4b0194816040516115579190611dc9565b60405180910390a150565b61156a610987565b6115a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115a090611e7f565b60405180910390fd5b60008060146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6115ec611117565b6040516115f99190611dc9565b60405180910390a1565b61160b610987565b1561164b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164290611eff565b60405180910390fd5b6001600060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861168f611117565b60405161169c9190611dc9565b60405180910390a1565b6040518060400160405280600081526020016000151581525090565b60006116d56116d084611fe3565b611fbe565b905080838252602082019050828560208602820111156116f457600080fd5b60005b85811015611724578161170a888261181b565b8452602084019350602083019250506001810190506116f7565b5050509392505050565b600061174161173c8461200f565b611fbe565b9050808382526020820190508285602086028201111561176057600080fd5b60005b858110156117905781611776888261190d565b845260208401935060208301925050600181019050611763565b5050509392505050565b60006117ad6117a88461203b565b611fbe565b905080838252602082019050828560208602820111156117cc57600080fd5b60005b858110156117fc57816117e28882611922565b8452602084019350602083019250506001810190506117cf565b5050509392505050565b600081359050611815816125cb565b92915050565b60008135905061182a816125e2565b92915050565b600082601f83011261184157600080fd5b81356118518482602086016116c2565b91505092915050565b600082601f83011261186b57600080fd5b813561187b84826020860161172e565b91505092915050565b60008083601f84011261189657600080fd5b8235905067ffffffffffffffff8111156118af57600080fd5b6020830191508360408202830111156118c757600080fd5b9250929050565b600082601f8301126118df57600080fd5b81356118ef84826020860161179a565b91505092915050565b600081359050611907816125f9565b92915050565b60008135905061191c81612610565b92915050565b60008135905061193181612627565b92915050565b60006020828403121561194957600080fd5b600061195784828501611806565b91505092915050565b600080600080600060a0868803121561197857600080fd5b60006119868882890161181b565b955050602061199788828901611922565b94505060406119a88882890161190d565b93505060606119b988828901611922565b92505060806119ca88828901611922565b9150509295509295909350565b600080604083850312156119ea57600080fd5b60006119f885828601611806565b9250506020611a0985828601611922565b9150509250929050565b600080600080600060a08688031215611a2b57600080fd5b600086013567ffffffffffffffff811115611a4557600080fd5b611a5188828901611830565b955050602086013567ffffffffffffffff811115611a6e57600080fd5b611a7a888289016118ce565b945050604086013567ffffffffffffffff811115611a9757600080fd5b611aa38882890161185a565b9350506060611ab488828901611922565b9250506080611ac588828901611922565b9150509295509295909350565b60008060208385031215611ae557600080fd5b600083013567ffffffffffffffff811115611aff57600080fd5b611b0b85828601611884565b92509250509250929050565b600060208284031215611b2957600080fd5b6000611b378482850161190d565b91505092915050565b600060208284031215611b5257600080fd5b6000611b6084828501611922565b91505092915050565b60008060408385031215611b7c57600080fd5b6000611b8a85828601611922565b9250506020611b9b85828601611806565b9150509250929050565b60008060408385031215611bb857600080fd5b6000611bc685828601611922565b9250506020611bd7858286016118f8565b9150509250929050565b611bea816121cb565b82525050565b611bf981612167565b82525050565b611c088161218b565b82525050565b611c178161218b565b82525050565b611c2681612197565b82525050565b6000611c39601483612072565b9150611c44826123a1565b602082019050919050565b6000611c5c601483612072565b9150611c67826123ca565b602082019050919050565b6000611c7f601b83612072565b9150611c8a826123f3565b602082019050919050565b6000611ca2602683612072565b9150611cad8261241c565b604082019050919050565b6000611cc5601483612072565b9150611cd08261246b565b602082019050919050565b6000611ce8601083612072565b9150611cf382612494565b602082019050919050565b6000611d0b602083612072565b9150611d16826124bd565b602082019050919050565b6000611d2e600083612067565b9150611d39826124e6565b600082019050919050565b6000611d51601583612072565b9150611d5c826124e9565b602082019050919050565b604082016000820151611d7d6000850182611d96565b506020820151611d906020850182611bff565b50505050565b611d9f816121c1565b82525050565b611dae816121c1565b82525050565b6000611dbf82611d21565b9150819050919050565b6000602082019050611dde6000830184611bf0565b92915050565b6000606082019050611df96000830186611be1565b611e066020830185611da5565b611e136040830184611c1d565b949350505050565b6000604082019050611e306000830185611bf0565b611e3d6020830184611da5565b9392505050565b6000602082019050611e596000830184611c0e565b92915050565b60006020820190508181036000830152611e7881611c2c565b9050919050565b60006020820190508181036000830152611e9881611c4f565b9050919050565b60006020820190508181036000830152611eb881611c72565b9050919050565b60006020820190508181036000830152611ed881611c95565b9050919050565b60006020820190508181036000830152611ef881611cb8565b9050919050565b60006020820190508181036000830152611f1881611cdb565b9050919050565b60006020820190508181036000830152611f3881611cfe565b9050919050565b60006020820190508181036000830152611f5881611d44565b9050919050565b6000604082019050611f746000830184611d67565b92915050565b6000602082019050611f8f6000830184611da5565b92915050565b6000604082019050611faa6000830185611da5565b611fb76020830184611c0e565b9392505050565b6000611fc8611fd9565b9050611fd4828261226b565b919050565b6000604051905090565b600067ffffffffffffffff821115611ffe57611ffd612314565b5b602082029050602081019050919050565b600067ffffffffffffffff82111561202a57612029612314565b5b602082029050602081019050919050565b600067ffffffffffffffff82111561205657612055612314565b5b602082029050602081019050919050565b600081905092915050565b600082825260208201905092915050565b600061208e826121c1565b9150612099836121c1565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156120ce576120cd6122e5565b5b828201905092915050565b60006120e4826121c1565b91506120ef836121c1565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612128576121276122e5565b5b828202905092915050565b600061213e826121c1565b9150612149836121c1565b92508282101561215c5761215b6122e5565b5b828203905092915050565b6000612172826121a1565b9050919050565b6000612184826121a1565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006121d6826121ef565b9050919050565b60006121e88261218b565b9050919050565b60006121fa82612201565b9050919050565b600061220c826121a1565b9050919050565b600061221e826121c1565b9050919050565b6000810160008301806122378161236d565b905061224381846125a8565b50505060018101602083018061225881612357565b90506122648184612577565b5050505050565b61227482612383565b810181811067ffffffffffffffff8211171561229357612292612314565b5b80604052505050565b60006122a7826121c1565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156122da576122d96122e5565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000819050919050565b6000819050919050565b60008135612364816125f9565b80915050919050565b6000813561237a81612627565b80915050919050565b6000601f19601f8301169050919050565b60008160001b9050919050565b7f53656e64657220726f6c65207265717569726564000000000000000000000000600082015250565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f436861696e2069732063757272656e746c792064697361626c65640000000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4661696c656420746f2073656e64204574686572000000000000000000000000600082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b50565b7f496e707574206c656e677468206d69736d617463680000000000000000000000600082015250565b600060ff61251f84612394565b9350801983169250808416831791505092915050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61256184612394565b9350801983169250808416831791505092915050565b612580826121dd565b61259361258c82612343565b8354612512565b8255505050565b6125a48282612225565b5050565b6125b182612213565b6125c46125bd8261234d565b8354612535565b8255505050565b6125d481612167565b81146125df57600080fd5b50565b6125eb81612179565b81146125f657600080fd5b50565b6126028161218b565b811461260d57600080fd5b50565b61261981612197565b811461262457600080fd5b50565b612630816121c1565b811461263b57600080fd5b5056fea2646970667358221220a20584266cfb1330ad52a32361fdcad1a8b049c48d067aac467033d13ddd4a8d64736f6c63430008040033
Smart Contracts contract page background

Checkout more smart contracts

    Ethereum  logo

    LidoExecutionLayerRewardsVault

    Verified

    The following smart contract is called LidoExecutionLayerRewardsVault. It is used to manage rewards for the Lido protocol. The contract allows Lido to withdraw rewards, recover ERC20 and ERC721 tokens, and receive ETH. The contract uses the SafeERC20 library to ensure safe transfers of ERC20 tokens. The purpose of this contract is to provide a secure and efficient way to manage rewards for the Lido protocol.

    0x388c818ca8b9251b393131c08a736a67ccb19297
    Copied
    • Lido
    • Proposer Fee Recipient
    • Router
    Ethereum  logo

    Registry

    Verified

    The following smart contract is a Registry contract that manages routes for cross-chain transfers. It allows adding, disabling, and executing routes for middleware and bridge contracts. It also includes a function for rescuing funds and uses OpenZeppelin libraries for access control and ERC20 token handling.

    0xc30141b657f4216252dc59af2e7cdb9d8792e1b0
    Copied
    • Verified, Router
    • Router
    Ethereum  logo

    GasRefunder

    Verified

    The following smart contract is a GasRefunder contract that refunds gas costs to specified refundees. It allows the owner to set common parameters such as maximum refundee balance, extra gas margin, calldata cost, maximum gas tip, maximum gas cost, and maximum single gas usage. The contract also allows the owner to set allowed contracts and refundees, and withdraw funds.

    0xe64a54e2533fd126c2e452c5fab544d80e2e4eb5
    Copied
    • Verified, Router
    • Router
Section background image

Build blockchain magic

Alchemy combines the most powerful web3 developer products and tools with resources, community and legendary support.

Get your API key