Source Code
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Name:
RemoteAdmin
Compiler Version
v0.8.23+commit.f704f362
Optimization Enabled:
Yes with 200 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity 0.8.23;
import { IHopComposer } from "src/contracts/hop/interfaces/IHopComposer.sol";
/// @notice Contract to remotely set admin functions on contracts via hops
/// @dev must be authorized as REMOTE_ADMIN_ROLE on target HopV2 contract
contract RemoteAdmin is IHopComposer {
uint32 internal constant FRAXTAL_EID = 30255;
address public immutable frxUsdOft;
address public immutable hopV2;
bytes32 public immutable fraxtalMsig;
error NotAuthorized();
error InvalidSourceEid();
error InvalidOFT();
error FailedRemoteCall();
constructor(address _frxUsdOft, address _hopV2, address _fraxtalMsig) {
frxUsdOft = _frxUsdOft;
hopV2 = _hopV2;
fraxtalMsig = bytes32(uint256(uint160(_fraxtalMsig)));
}
function hopCompose(
uint32 _srcEid,
bytes32 _sender,
address _oft,
uint256 /* _amount */,
bytes memory _data
) external override {
// Only allow composes from the RemoteHop via the hopCompose() call inside lzCompose()
// where the original sender is the fraxtal msig
if (msg.sender != hopV2 || _sender != fraxtalMsig) {
revert NotAuthorized();
}
if (_srcEid != FRAXTAL_EID) {
revert InvalidSourceEid();
}
if (_oft != frxUsdOft) {
revert InvalidOFT();
}
(address target, bytes memory data) = abi.decode(_data, (address, bytes));
(bool success, ) = target.call(data);
if (!success) revert FailedRemoteCall();
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IHopComposer {
function hopCompose(uint32 _srcEid, bytes32 _sender, address _oft, uint256 _amount, bytes memory _data) external;
}{
"remappings": [
"frax-std/=node_modules/frax-standard-solidity/src/",
"@prb/test/=node_modules/@prb/test/",
"forge-std/=node_modules/forge-std/src/",
"ds-test/=node_modules/ds-test/src/",
"@openzeppelin/=node_modules/@openzeppelin/",
"@axelar-network/=node_modules/@axelar-network/",
"@chainlink/=node_modules/@chainlink/",
"@eth-optimism/=node_modules/@eth-optimism/",
"@fraxfinance/=node_modules/@fraxfinance/",
"@layerzerolabs/=node_modules/@layerzerolabs/",
"frax-standard-solidity/=node_modules/frax-standard-solidity/",
"hardhat-deploy/=node_modules/hardhat-deploy/",
"solidity-bytes-utils/=node_modules/solidity-bytes-utils/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "none",
"appendCBOR": false
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "shanghai",
"viaIR": false
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_frxUsdOft","type":"address"},{"internalType":"address","name":"_hopV2","type":"address"},{"internalType":"address","name":"_fraxtalMsig","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"FailedRemoteCall","type":"error"},{"inputs":[],"name":"InvalidOFT","type":"error"},{"inputs":[],"name":"InvalidSourceEid","type":"error"},{"inputs":[],"name":"NotAuthorized","type":"error"},{"inputs":[],"name":"fraxtalMsig","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"frxUsdOft","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_srcEid","type":"uint32"},{"internalType":"bytes32","name":"_sender","type":"bytes32"},{"internalType":"address","name":"_oft","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"hopCompose","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"hopV2","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60e060405234801561000f575f80fd5b5060405161057338038061057383398101604081905261002e91610066565b6001600160a01b0392831660805290821660a0521660c0526100a6565b80516001600160a01b0381168114610061575f80fd5b919050565b5f805f60608486031215610078575f80fd5b6100818461004b565b925061008f6020850161004b565b915061009d6040850161004b565b90509250925092565b60805160a05160c0516104916100e25f395f818160d3015261013801525f81816053015261010e01525f8181609701526101a301526104915ff3fe608060405234801561000f575f80fd5b506004361061004a575f3560e01c80635e84b81c1461004e5780636d07981314610092578063b56ffd4f146100b9578063e275fc6a146100ce575b5f80fd5b6100757f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6100757f000000000000000000000000000000000000000000000000000000000000000081565b6100cc6100c7366004610313565b610103565b005b6100f57f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610089565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614158061015b57507f00000000000000000000000000000000000000000000000000000000000000008414155b156101795760405163ea8e4eb560e01b815260040160405180910390fd5b63ffffffff851661762f146101a157604051632f746eff60e01b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b0316146101f357604051633a09f24360e11b815260040160405180910390fd5b5f808280602001905181019061020991906103ee565b915091505f826001600160a01b0316826040516102269190610476565b5f604051808303815f865af19150503d805f811461025f576040519150601f19603f3d011682016040523d82523d5f602084013e610264565b606091505b505090508061028657604051634f791bf960e01b815260040160405180910390fd5b5050505050505050565b6001600160a01b03811681146102a4575f80fd5b50565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156102e4576102e46102a7565b604052919050565b5f67ffffffffffffffff821115610305576103056102a7565b50601f01601f191660200190565b5f805f805f60a08688031215610327575f80fd5b853563ffffffff8116811461033a575f80fd5b945060208601359350604086013561035181610290565b925060608601359150608086013567ffffffffffffffff811115610373575f80fd5b8601601f81018813610383575f80fd5b8035610396610391826102ec565b6102bb565b8181528960208385010111156103aa575f80fd5b816020840160208301375f602083830101528093505050509295509295909350565b5f5b838110156103e65781810151838201526020016103ce565b50505f910152565b5f80604083850312156103ff575f80fd5b825161040a81610290565b602084015190925067ffffffffffffffff811115610426575f80fd5b8301601f81018513610436575f80fd5b8051610444610391826102ec565b818152866020838501011115610458575f80fd5b6104698260208301602086016103cc565b8093505050509250929050565b5f82516104878184602087016103cc565b91909101929150505600000000000000000000000096a394058e2b84a89bac9667b19661ed003cf5d40000000000000000000000001b93526ea567d59b7fd38126bb74d72818166c510000000000000000000000005f25218ed9474b721d6a38c115107428e832fa2e
Deployed Bytecode
0x608060405234801561000f575f80fd5b506004361061004a575f3560e01c80635e84b81c1461004e5780636d07981314610092578063b56ffd4f146100b9578063e275fc6a146100ce575b5f80fd5b6100757f0000000000000000000000001b93526ea567d59b7fd38126bb74d72818166c5181565b6040516001600160a01b0390911681526020015b60405180910390f35b6100757f00000000000000000000000096a394058e2b84a89bac9667b19661ed003cf5d481565b6100cc6100c7366004610313565b610103565b005b6100f57f0000000000000000000000005f25218ed9474b721d6a38c115107428e832fa2e81565b604051908152602001610089565b336001600160a01b037f0000000000000000000000001b93526ea567d59b7fd38126bb74d72818166c511614158061015b57507f0000000000000000000000005f25218ed9474b721d6a38c115107428e832fa2e8414155b156101795760405163ea8e4eb560e01b815260040160405180910390fd5b63ffffffff851661762f146101a157604051632f746eff60e01b815260040160405180910390fd5b7f00000000000000000000000096a394058e2b84a89bac9667b19661ed003cf5d46001600160a01b0316836001600160a01b0316146101f357604051633a09f24360e11b815260040160405180910390fd5b5f808280602001905181019061020991906103ee565b915091505f826001600160a01b0316826040516102269190610476565b5f604051808303815f865af19150503d805f811461025f576040519150601f19603f3d011682016040523d82523d5f602084013e610264565b606091505b505090508061028657604051634f791bf960e01b815260040160405180910390fd5b5050505050505050565b6001600160a01b03811681146102a4575f80fd5b50565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156102e4576102e46102a7565b604052919050565b5f67ffffffffffffffff821115610305576103056102a7565b50601f01601f191660200190565b5f805f805f60a08688031215610327575f80fd5b853563ffffffff8116811461033a575f80fd5b945060208601359350604086013561035181610290565b925060608601359150608086013567ffffffffffffffff811115610373575f80fd5b8601601f81018813610383575f80fd5b8035610396610391826102ec565b6102bb565b8181528960208385010111156103aa575f80fd5b816020840160208301375f602083830101528093505050509295509295909350565b5f5b838110156103e65781810151838201526020016103ce565b50505f910152565b5f80604083850312156103ff575f80fd5b825161040a81610290565b602084015190925067ffffffffffffffff811115610426575f80fd5b8301601f81018513610436575f80fd5b8051610444610391826102ec565b818152866020838501011115610458575f80fd5b6104698260208301602086016103cc565b8093505050509250929050565b5f82516104878184602087016103cc565b919091019291505056
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000096a394058e2b84a89bac9667b19661ed003cf5d40000000000000000000000001b93526ea567d59b7fd38126bb74d72818166c510000000000000000000000005f25218ed9474b721d6a38c115107428e832fa2e
-----Decoded View---------------
Arg [0] : _frxUsdOft (address): 0x96A394058E2b84A89bac9667B19661Ed003cF5D4
Arg [1] : _hopV2 (address): 0x1b93526eA567d59B7FD38126bb74D72818166C51
Arg [2] : _fraxtalMsig (address): 0x5f25218ed9474b721d6a38c115107428E832fA2E
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000096a394058e2b84a89bac9667b19661ed003cf5d4
Arg [1] : 0000000000000000000000001b93526ea567d59b7fd38126bb74d72818166c51
Arg [2] : 0000000000000000000000005f25218ed9474b721d6a38c115107428e832fa2e
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in FRAX
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
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.