Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0xa40dfca5ada9bee68d0eb575e71fe632ed612228a8818bda654a9d92ea3ad7f5 | Deposit | (pending) | 19 days ago | IN | 0.00008 ETH | (Pending) | |||
Deposit | 19799792 | 202 days ago | IN | 0.001 ETH | 0.00068104 | ||||
Deposit | 19708033 | 215 days ago | IN | 0.001 ETH | 0.0008513 | ||||
Deposit | 19657120 | 222 days ago | IN | 0.01 ETH | 0.00133932 | ||||
Deposit | 19601458 | 230 days ago | IN | 0.0001 ETH | 0.00151431 | ||||
Deposit | 19422433 | 255 days ago | IN | 0.21 ETH | 0.00722017 | ||||
Deposit | 19422428 | 255 days ago | IN | 8.5 ETH | 0.00689992 | ||||
Deposit | 19422426 | 255 days ago | IN | 0.13 ETH | 0.00716357 | ||||
Deposit | 19422425 | 255 days ago | IN | 0.12 ETH | 0.00749106 | ||||
Deposit | 19422425 | 255 days ago | IN | 0.13 ETH | 0.00749106 | ||||
Deposit | 19422423 | 255 days ago | IN | 0.15 ETH | 0.00791922 | ||||
Deposit | 19422423 | 255 days ago | IN | 0.11 ETH | 0.00791924 | ||||
Deposit | 19422400 | 255 days ago | IN | 0.48 ETH | 0.00725323 | ||||
Deposit | 19422385 | 255 days ago | IN | 2 ETH | 0.00765528 | ||||
Deposit | 19422354 | 255 days ago | IN | 0.423 ETH | 0.00886163 | ||||
Deposit | 19422348 | 255 days ago | IN | 0.42 ETH | 0.00857794 | ||||
Deposit | 19422277 | 255 days ago | IN | 2.275 ETH | 0.00786165 | ||||
Deposit | 19422276 | 255 days ago | IN | 3.73 ETH | 0.00750692 | ||||
Deposit | 19422212 | 255 days ago | IN | 3.573 ETH | 0.0095352 | ||||
Deposit | 19422179 | 255 days ago | IN | 1 ETH | 0.00975381 | ||||
Deposit | 19422141 | 255 days ago | IN | 3 ETH | 0.0090309 | ||||
Deposit | 19422120 | 255 days ago | IN | 2.6 ETH | 0.00922338 | ||||
Deposit | 19421954 | 255 days ago | IN | 1.01 ETH | 0.00867182 | ||||
Deposit | 19421882 | 255 days ago | IN | 3.35 ETH | 0.00923388 | ||||
Deposit | 19421751 | 255 days ago | IN | 0.015 ETH | 0.00940295 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
19799792 | 202 days ago | 0.001 ETH | ||||
19708033 | 215 days ago | 0.001 ETH | ||||
19657120 | 222 days ago | 0.01 ETH | ||||
19601458 | 230 days ago | 0.0001 ETH | ||||
19422433 | 255 days ago | 0.21 ETH | ||||
19422428 | 255 days ago | 8.5 ETH | ||||
19422426 | 255 days ago | 0.13 ETH | ||||
19422425 | 255 days ago | 0.12 ETH | ||||
19422425 | 255 days ago | 0.13 ETH | ||||
19422423 | 255 days ago | 0.15 ETH | ||||
19422423 | 255 days ago | 0.11 ETH | ||||
19422400 | 255 days ago | 0.48 ETH | ||||
19422385 | 255 days ago | 2 ETH | ||||
19422354 | 255 days ago | 0.423 ETH | ||||
19422348 | 255 days ago | 0.42 ETH | ||||
19422277 | 255 days ago | 2.275 ETH | ||||
19422276 | 255 days ago | 3.73 ETH | ||||
19422212 | 255 days ago | 3.573 ETH | ||||
19422179 | 255 days ago | 1 ETH | ||||
19422141 | 255 days ago | 3 ETH | ||||
19422120 | 255 days ago | 2.6 ETH | ||||
19421954 | 255 days ago | 1.01 ETH | ||||
19421882 | 255 days ago | 3.35 ETH | ||||
19421751 | 255 days ago | 0.015 ETH | ||||
19421744 | 255 days ago | 0.68 ETH |
Loading...
Loading
Contract Name:
DepositHelper
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 10 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.21; import {IStoneVault} from "../interfaces/IStoneVault.sol"; import {TransferHelper} from "@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract DepositHelper is ReentrancyGuard { address public immutable stone; address payable public immutable vault; address public immutable wallet; event DepositTo( address indexed srcAddr, address indexed dstAddr, address indexed wallet, uint256 etherAmount, uint256 stoneAmount ); constructor(address _stone, address payable _vault, address _wallet) { require(_stone != address(0), "zero address"); require(_vault != address(0), "zero address"); require(_wallet != address(0), "zero address"); stone = _stone; vault = _vault; wallet = _wallet; } function deposit( address _dstAddress ) public payable nonReentrant returns (uint256 stoneMinted) { require(msg.value > 0, "ZERO Amount"); IStoneVault stoneVault = IStoneVault(vault); stoneMinted = stoneVault.deposit{value: msg.value}(); TransferHelper.safeTransfer(stone, wallet, stoneMinted); emit DepositTo(msg.sender, _dstAddress, wallet, msg.value, stoneMinted); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.21; interface IStoneVault { function deposit() external payable returns (uint256 mintAmount); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.6.0; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; library TransferHelper { /// @notice Transfers tokens from the targeted address to the given destination /// @notice Errors with 'STF' if transfer fails /// @param token The contract address of the token to be transferred /// @param from The originating address from which the tokens will be transferred /// @param to The destination address of the transfer /// @param value The amount to be transferred function safeTransferFrom( address token, address from, address to, uint256 value ) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'STF'); } /// @notice Transfers tokens from msg.sender to a recipient /// @dev Errors with ST if transfer fails /// @param token The contract address of the token which will be transferred /// @param to The recipient of the transfer /// @param value The value of the transfer function safeTransfer( address token, address to, uint256 value ) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'ST'); } /// @notice Approves the stipulated contract to spend the given allowance in the given token /// @dev Errors with 'SA' if transfer fails /// @param token The contract address of the token to be approved /// @param to The target of the approval /// @param value The amount of the given token the target will be allowed to spend function safeApprove( address token, address to, uint256 value ) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.approve.selector, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'SA'); } /// @notice Transfers ETH to the recipient address /// @dev Fails with `STE` /// @param to The destination of the transfer /// @param value The value to be transferred function safeTransferETH(address to, uint256 value) internal { (bool success, ) = to.call{value: value}(new bytes(0)); require(success, 'STE'); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); /** * @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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (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() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 10 }, "evmVersion": "shanghai", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_stone","type":"address"},{"internalType":"address payable","name":"_vault","type":"address"},{"internalType":"address","name":"_wallet","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"srcAddr","type":"address"},{"indexed":true,"internalType":"address","name":"dstAddr","type":"address"},{"indexed":true,"internalType":"address","name":"wallet","type":"address"},{"indexed":false,"internalType":"uint256","name":"etherAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"stoneAmount","type":"uint256"}],"name":"DepositTo","type":"event"},{"inputs":[{"internalType":"address","name":"_dstAddress","type":"address"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"stoneMinted","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"stone","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60e060405234801561000f575f80fd5b5060405161065d38038061065d83398101604081905261002e916100e1565b60015f556001600160a01b0383166100615760405162461bcd60e51b81526004016100589061012b565b60405180910390fd5b6001600160a01b0382166100875760405162461bcd60e51b81526004016100589061012b565b6001600160a01b0381166100ad5760405162461bcd60e51b81526004016100589061012b565b6001600160a01b0392831660805290821660a0521660c052610151565b6001600160a01b03811681146100de575f80fd5b50565b5f805f606084860312156100f3575f80fd5b83516100fe816100ca565b602085015190935061010f816100ca565b6040850151909250610120816100ca565b809150509250925092565b6020808252600c908201526b7a65726f206164647265737360a01b604082015260600190565b60805160a05160c0516104c96101945f395f818160a301528181610213015261025001525f818160f7015261016701525f8181605301526101f201526104c95ff3fe60806040526004361061003e575f3560e01c80630167eb8514610042578063521eb27314610092578063f340fa01146100c5578063fbfa77cf146100e6575b5f80fd5b34801561004d575f80fd5b506100757f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561009d575f80fd5b506100757f000000000000000000000000000000000000000000000000000000000000000081565b6100d86100d3366004610404565b610119565b604051908152602001610089565b3480156100f1575f80fd5b506100757f000000000000000000000000000000000000000000000000000000000000000081565b5f6101226102b2565b5f34116101645760405162461bcd60e51b815260206004820152600b60248201526a16915493c8105b5bdd5b9d60aa1b60448201526064015b60405180910390fd5b5f7f00000000000000000000000000000000000000000000000000000000000000009050806001600160a01b031663d0e30db0346040518263ffffffff1660e01b815260040160206040518083038185885af11580156101c6573d5f803e3d5ffd5b50505050506040513d601f19601f820116820180604052508101906101eb9190610431565b91506102387f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000084610309565b60408051348152602081018490526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116929086169133917fbb4c1ad7429e95f013be0d74b97dfe0307ecb8f3072c5684d1bdab6ce0132ab1910160405180910390a4506102ad60015f55565b919050565b60025f54036103035760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161015b565b60025f55565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291515f928392908716916103649190610448565b5f604051808303815f865af19150503d805f811461039d576040519150601f19603f3d011682016040523d82523d5f602084013e6103a2565b606091505b50915091508180156103cc5750805115806103cc5750808060200190518101906103cc9190610474565b6103fd5760405162461bcd60e51b815260206004820152600260248201526114d560f21b604482015260640161015b565b5050505050565b5f60208284031215610414575f80fd5b81356001600160a01b038116811461042a575f80fd5b9392505050565b5f60208284031215610441575f80fd5b5051919050565b5f82515f5b81811015610467576020818601810151858301520161044d565b505f920191825250919050565b5f60208284031215610484575f80fd5b8151801515811461042a575f80fdfea264697066735822122056e1870f993b75f5633b41550a3580fd0de036be39254aedfc03664c99c527ab64736f6c634300081500330000000000000000000000007122985656e38bdc0302db86685bb972b145bd3c000000000000000000000000a62f9c5af106feee069f38de51098d9d81b90572000000000000000000000000eea3a032f381ab1e415e82fe08ebeb20f513c42c
Deployed Bytecode
0x60806040526004361061003e575f3560e01c80630167eb8514610042578063521eb27314610092578063f340fa01146100c5578063fbfa77cf146100e6575b5f80fd5b34801561004d575f80fd5b506100757f0000000000000000000000007122985656e38bdc0302db86685bb972b145bd3c81565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561009d575f80fd5b506100757f000000000000000000000000eea3a032f381ab1e415e82fe08ebeb20f513c42c81565b6100d86100d3366004610404565b610119565b604051908152602001610089565b3480156100f1575f80fd5b506100757f000000000000000000000000a62f9c5af106feee069f38de51098d9d81b9057281565b5f6101226102b2565b5f34116101645760405162461bcd60e51b815260206004820152600b60248201526a16915493c8105b5bdd5b9d60aa1b60448201526064015b60405180910390fd5b5f7f000000000000000000000000a62f9c5af106feee069f38de51098d9d81b905729050806001600160a01b031663d0e30db0346040518263ffffffff1660e01b815260040160206040518083038185885af11580156101c6573d5f803e3d5ffd5b50505050506040513d601f19601f820116820180604052508101906101eb9190610431565b91506102387f0000000000000000000000007122985656e38bdc0302db86685bb972b145bd3c7f000000000000000000000000eea3a032f381ab1e415e82fe08ebeb20f513c42c84610309565b60408051348152602081018490526001600160a01b037f000000000000000000000000eea3a032f381ab1e415e82fe08ebeb20f513c42c8116929086169133917fbb4c1ad7429e95f013be0d74b97dfe0307ecb8f3072c5684d1bdab6ce0132ab1910160405180910390a4506102ad60015f55565b919050565b60025f54036103035760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161015b565b60025f55565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291515f928392908716916103649190610448565b5f604051808303815f865af19150503d805f811461039d576040519150601f19603f3d011682016040523d82523d5f602084013e6103a2565b606091505b50915091508180156103cc5750805115806103cc5750808060200190518101906103cc9190610474565b6103fd5760405162461bcd60e51b815260206004820152600260248201526114d560f21b604482015260640161015b565b5050505050565b5f60208284031215610414575f80fd5b81356001600160a01b038116811461042a575f80fd5b9392505050565b5f60208284031215610441575f80fd5b5051919050565b5f82515f5b81811015610467576020818601810151858301520161044d565b505f920191825250919050565b5f60208284031215610484575f80fd5b8151801515811461042a575f80fdfea264697066735822122056e1870f993b75f5633b41550a3580fd0de036be39254aedfc03664c99c527ab64736f6c63430008150033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000007122985656e38bdc0302db86685bb972b145bd3c000000000000000000000000a62f9c5af106feee069f38de51098d9d81b90572000000000000000000000000eea3a032f381ab1e415e82fe08ebeb20f513c42c
-----Decoded View---------------
Arg [0] : _stone (address): 0x7122985656e38BDC0302Db86685bb972b145bD3C
Arg [1] : _vault (address): 0xA62F9C5af106FeEE069F38dE51098D9d81B90572
Arg [2] : _wallet (address): 0xeea3A032f381AB1E415e82Fe08ebeb20F513c42c
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000007122985656e38bdc0302db86685bb972b145bd3c
Arg [1] : 000000000000000000000000a62f9c5af106feee069f38de51098d9d81b90572
Arg [2] : 000000000000000000000000eea3a032f381ab1e415e82fe08ebeb20f513c42c
Loading...
Loading
Loading...
Loading
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.