Source Code
Overview
XPL Balance
XPL Value
$0.00Latest 1 from a total of 1 transactions
| Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Set Args | 13841764 | 4 days ago | IN | 0 XPL | 0.00000068 |
Latest 1 internal transaction
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 13841750 | 4 days ago | Contract Creation | 0 XPL |
Loading...
Loading
Contract Name:
ConstructorArguments
Compiler Version
v0.8.22+commit.4fc1097e
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.22;
import { IConstructorArguments } from "./interfaces/IConstructorArguments.sol";
import { IFeeCalculator } from "./interfaces/IFeeCalculator.sol";
import { INativeTokenNames } from "./interfaces/INativeTokenNames.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
// A simple contract to pass constructor arguments to a contract. This is useful for CREATE2, since different constructor arguments will result in different initialization bytecode, which will change the deployed address. (e.g. LayerZero Endpoint V2 addresses are inconsistent across chains)
contract ConstructorArguments is IConstructorArguments, Ownable {
error ZeroAddress();
address public lzEndpointArg;
address public ownerArg;
IFeeCalculator public feeCalculatorArg;
address public feeRecipientArg;
INativeTokenNames public nativeTokenNamesArg;
// We need to manually pass to avoid the CREATE2 deployer being the owner.
constructor(address _owner) Ownable(_owner) {}
function setArgs(
address _lzEndpoint,
address _owner,
IFeeCalculator _feeCalculator,
address _feeRecipient,
INativeTokenNames _nativeTokenNames
) external onlyOwner {
if (_lzEndpoint == address(0)) revert ZeroAddress();
if (_owner == address(0)) revert ZeroAddress();
if (address(_feeCalculator) == address(0)) revert ZeroAddress();
if (_feeRecipient == address(0)) revert ZeroAddress();
if (address(_nativeTokenNames) == address(0)) revert ZeroAddress();
lzEndpointArg = _lzEndpoint;
ownerArg = _owner;
feeCalculatorArg = _feeCalculator;
feeRecipientArg = _feeRecipient;
nativeTokenNamesArg = _nativeTokenNames;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../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.
*
* The initial owner is set to the address provided by the deployer. 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;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling 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 {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_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 (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @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;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.22;
import { IFeeCalculator } from "./IFeeCalculator.sol";
import { INativeTokenNames } from "./INativeTokenNames.sol";
interface IConstructorArguments {
function lzEndpointArg() external view returns (address);
function ownerArg() external view returns (address);
function feeCalculatorArg() external view returns (IFeeCalculator);
function feeRecipientArg() external view returns (address);
function nativeTokenNamesArg() external view returns (INativeTokenNames);
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.22;
import { WrapSpec } from "../types/WrapSpec.sol";
interface IFeeCalculator {
function bridge(address _user, WrapSpec calldata _spec, uint256 _amount) external view returns (uint256);
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.22;
interface INativeTokenNames {
function nativeNames(uint256 chainId) external view returns (string memory);
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.22;
/*
| Token Type | collection |
|---------------|-----------------------|
| Native | `== address(0)` |
| ERC20 | `!= address(0)` |
*/
struct WrapSpec {
uint256 chainId;
address collection;
}
library WrapSpecLib {
function getId(WrapSpec memory _wrapSpec) internal pure returns (uint256) {
return uint256(keccak256(abi.encodePacked(_wrapSpec.chainId, _wrapSpec.collection)));
}
}{
"viaIR": true,
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"metadata": {
"useLiteralContent": true
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"feeCalculatorArg","outputs":[{"internalType":"contract IFeeCalculator","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeRecipientArg","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lzEndpointArg","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nativeTokenNamesArg","outputs":[{"internalType":"contract INativeTokenNames","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ownerArg","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lzEndpoint","type":"address"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"contract IFeeCalculator","name":"_feeCalculator","type":"address"},{"internalType":"address","name":"_feeRecipient","type":"address"},{"internalType":"contract INativeTokenNames","name":"_nativeTokenNames","type":"address"}],"name":"setArgs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
6080346100bb57601f61049538819003918201601f19168301916001600160401b038311848410176100c0578084926020946040528339810103126100bb57516001600160a01b0390818116908190036100bb5780156100a257600080546001600160a01b03198116831782556040519316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36103be90816100d78239f35b604051631e4fbdf760e01b815260006004820152602490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe6080604081815260048036101561001557600080fd5b600092833560e01c9081630e324c131461031c575080631342b3f0146102f55780632341ec51146102135780632d10285b146101ea5780632daabb13146101c1578063715018a6146101645780638da5cb5b1461013c578063f0d972331461010f5763f2fde38b1461008657600080fd5b3461010b57602036600319011261010b5761009f610341565b906100a861035c565b6001600160a01b039182169283156100f557505082546001600160a01b0319811683178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b51631e4fbdf760e01b8152908101849052602490fd5b8280fd5b50503461013857816003193601126101385760035490516001600160a01b039091168152602090f35b5080fd5b505034610138578160031936011261013857905490516001600160a01b039091168152602090f35b83346101be57806003193601126101be5761017d61035c565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b80fd5b50503461013857816003193601126101385760055490516001600160a01b039091168152602090f35b50503461013857816003193601126101385760015490516001600160a01b039091168152602090f35b50903461010b5760a036600319011261010b5761022e610341565b916001600160a01b03602435818116908190036102f157604435908282168092036102ed57606435928084168094036102e957608435968188168098036102e55761027761035c565b169485156102d65781156102d65782156102d65783156102d65786156102d657506bffffffffffffffffffffffff60a01b9485600154161760015584600254161760025583600354161760035582825416179055600554161760055580f35b5163d92e233d60e01b81528490fd5b8880fd5b8780fd5b8680fd5b8580fd5b503461010b578260031936011261010b575490516001600160a01b03909116815260209150f35b8490346101385781600319360112610138576002546001600160a01b03168152602090f35b600435906001600160a01b038216820361035757565b600080fd5b6000546001600160a01b0316330361037057565b60405163118cdaa760e01b8152336004820152602490fdfea2646970667358221220db961ac029b9bfd1de1b4e0140aad6d8ced03bf8bb55b737db16324efec16cb064736f6c63430008160033000000000000000000000000db6d2e440268b5634d3bde61551122dbda37cbcb
Deployed Bytecode
0x6080604081815260048036101561001557600080fd5b600092833560e01c9081630e324c131461031c575080631342b3f0146102f55780632341ec51146102135780632d10285b146101ea5780632daabb13146101c1578063715018a6146101645780638da5cb5b1461013c578063f0d972331461010f5763f2fde38b1461008657600080fd5b3461010b57602036600319011261010b5761009f610341565b906100a861035c565b6001600160a01b039182169283156100f557505082546001600160a01b0319811683178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b51631e4fbdf760e01b8152908101849052602490fd5b8280fd5b50503461013857816003193601126101385760035490516001600160a01b039091168152602090f35b5080fd5b505034610138578160031936011261013857905490516001600160a01b039091168152602090f35b83346101be57806003193601126101be5761017d61035c565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b80fd5b50503461013857816003193601126101385760055490516001600160a01b039091168152602090f35b50503461013857816003193601126101385760015490516001600160a01b039091168152602090f35b50903461010b5760a036600319011261010b5761022e610341565b916001600160a01b03602435818116908190036102f157604435908282168092036102ed57606435928084168094036102e957608435968188168098036102e55761027761035c565b169485156102d65781156102d65782156102d65783156102d65786156102d657506bffffffffffffffffffffffff60a01b9485600154161760015584600254161760025583600354161760035582825416179055600554161760055580f35b5163d92e233d60e01b81528490fd5b8880fd5b8780fd5b8680fd5b8580fd5b503461010b578260031936011261010b575490516001600160a01b03909116815260209150f35b8490346101385781600319360112610138576002546001600160a01b03168152602090f35b600435906001600160a01b038216820361035757565b600080fd5b6000546001600160a01b0316330361037057565b60405163118cdaa760e01b8152336004820152602490fdfea2646970667358221220db961ac029b9bfd1de1b4e0140aad6d8ced03bf8bb55b737db16324efec16cb064736f6c63430008160033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000db6d2e440268b5634d3bde61551122dbda37cbcb
-----Decoded View---------------
Arg [0] : _owner (address): 0xdb6d2e440268B5634d3bDe61551122DbDa37Cbcb
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000db6d2e440268b5634d3bde61551122dbda37cbcb
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in XPL
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
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.