Note: Our ether balance display is temporarily unavailable. Please check back later.
Source Code
Overview
ETH Balance
Ether balance is temporarily unavailable. Please check back later.
More Info
ContractCreator
Multichain Info
N/A
Loading...
Loading
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
rETH_Burner
Compiler Version
v0.8.25+commit.b61c2a91
Optimization Enabled:
Yes with 200 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;
import {SelfDestruct} from "../common/SelfDestruct.sol";
import {IRocketTokenRETH} from "../../interfaces/burners/rETH/IRocketTokenRETH.sol";
import {IrETH_Burner} from "../../interfaces/burners/rETH/IrETH_Burner.sol";
contract rETH_Burner is IrETH_Burner {
/**
* @inheritdoc IrETH_Burner
*/
address public immutable COLLATERAL;
constructor(
address collateral
) {
COLLATERAL = collateral;
}
/**
* @inheritdoc IrETH_Burner
*/
function triggerBurn(
uint256 amount
) external {
IRocketTokenRETH(COLLATERAL).burn(amount);
uint256 ethToBurn = address(this).balance;
new SelfDestruct{value: ethToBurn}();
emit TriggerBurn(msg.sender, amount, ethToBurn);
}
receive() external payable {}
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;
contract SelfDestruct {
constructor() payable {
selfdestruct(payable(address(this)));
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IRocketTokenRETH {
// Calculate the amount of ETH backing an amount of rETH
function getEthValue(
uint256 _rethAmount
) external view returns (uint256);
// Calculate the amount of rETH backed by an amount of ETH
function getRethValue(
uint256 _ethAmount
) external view returns (uint256);
// Get the total amount of collateral available
// Includes rETH contract balance & excess deposit pool balance
function getTotalCollateral() external view returns (uint256);
// Mint rETH
// Only accepts calls from the RocketDepositPool contract
function mint(uint256 _ethAmount, address _to) external;
// Burn rETH for ETH
function burn(
uint256 _rethAmount
) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IrETH_Burner {
/**
* @notice Emitted when a burn is triggered.
* @param caller caller of the function
* @param assetAmount amount of collateral that was withdrawn
* @param ethAmount amount of ETH that was burned
*/
event TriggerBurn(address indexed caller, uint256 assetAmount, uint256 ethAmount);
/**
* @notice Get an address of the collateral.
*/
function COLLATERAL() external view returns (address);
/**
* @notice Trigger a claim and a burn of ETH.
* @param amount amount of collateral to burn
*/
function triggerBurn(
uint256 amount
) external;
}{
"remappings": [
"forge-std/=lib/forge-std/src/",
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
"@symbioticfi/core/=lib/core/",
"core/=lib/core/",
"ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
"erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
"openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "shanghai",
"viaIR": true,
"libraries": {}
}Contract ABI
API[{"inputs":[{"internalType":"address","name":"collateral","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"assetAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ethAmount","type":"uint256"}],"name":"TriggerBurn","type":"event"},{"inputs":[],"name":"COLLATERAL","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"triggerBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
60a034606b57601f61026938819003918201601f19168301916001600160401b03831184841017606f57808492602094604052833981010312606b57516001600160a01b0381168103606b576080526040516101e590816100848239608051818181604f0152609c0152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe60806040818152600436101561001e575b5050361561001c575f80fd5b005b5f915f3560e01c9081630bc8cbcf1461008257506324bbab8b03610010573461007e578160031936011261007e57517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5080fd5b919050346101a85760203660031901126101a857600435917f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316803b156101a857816024815f8094630852cd8d60e31b83528860048401525af1801561019e5761016e575b5047815160038082019082821067ffffffffffffffff83111761015a579082916101ad8339039082f01561015057907ff04af4aa419dbccb13024c7e3c652ec214ad43e79b4e23f36741bbe27580868191815193845260208401523392a280f35b81513d85823e3d90fd5b634e487b7160e01b87526041600452602487fd5b90925067ffffffffffffffff811161018a5782525f915f6100ef565b634e487b7160e01b5f52604160045260245ffd5b82513d5f823e3d90fd5b5f80fdfe30fffea2646970667358221220e459ba3eabadf8c9a621392f9658d27c39fc38aa845a52997bfb62a0882e368864736f6c634300081900330000000000000000000000007322c24752f79c05ffd1e2a6fcb97020c1c264f1
Deployed Bytecode
0x60806040818152600436101561001e575b5050361561001c575f80fd5b005b5f915f3560e01c9081630bc8cbcf1461008257506324bbab8b03610010573461007e578160031936011261007e57517f0000000000000000000000007322c24752f79c05ffd1e2a6fcb97020c1c264f16001600160a01b03168152602090f35b5080fd5b919050346101a85760203660031901126101a857600435917f0000000000000000000000007322c24752f79c05ffd1e2a6fcb97020c1c264f16001600160a01b0316803b156101a857816024815f8094630852cd8d60e31b83528860048401525af1801561019e5761016e575b5047815160038082019082821067ffffffffffffffff83111761015a579082916101ad8339039082f01561015057907ff04af4aa419dbccb13024c7e3c652ec214ad43e79b4e23f36741bbe27580868191815193845260208401523392a280f35b81513d85823e3d90fd5b634e487b7160e01b87526041600452602487fd5b90925067ffffffffffffffff811161018a5782525f915f6100ef565b634e487b7160e01b5f52604160045260245ffd5b82513d5f823e3d90fd5b5f80fdfe30fffea2646970667358221220e459ba3eabadf8c9a621392f9658d27c39fc38aa845a52997bfb62a0882e368864736f6c63430008190033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000007322c24752f79c05ffd1e2a6fcb97020c1c264f1
-----Decoded View---------------
Arg [0] : collateral (address): 0x7322c24752f79c05FFD1E2a6FCB97020C1C264F1
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000007322c24752f79c05ffd1e2a6fcb97020c1c264f1
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.