Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
| Transaction Hash |
Method
|
Block
|
From
|
To
|
Amount
|
||||
|---|---|---|---|---|---|---|---|---|---|
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
OmnichainExecutorOwner
Compiler Version
v0.8.25+commit.b61c2a91
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity 0.8.25;
import { AccessControlledV8 } from "../Governance/AccessControlledV8.sol";
import { IOmnichainGovernanceExecutor } from "./interfaces/IOmnichainGovernanceExecutor.sol";
import { ensureNonzeroAddress } from "@venusprotocol/solidity-utilities/contracts/validators.sol";
/**
* @title OmnichainExecutorOwner
* @author Venus
* @notice OmnichainProposalSender contract acts as a governance and access control mechanism,
* allowing owner to upsert signature of OmnichainGovernanceExecutor contract,
* also contains function to transfer the ownership of contract as well.
* @custom:security-contact https://github.com/VenusProtocol/governance-contracts#discussion
*/
contract OmnichainExecutorOwner is AccessControlledV8 {
/**
* @custom:oz-upgrades-unsafe-allow state-variable-immutable
*/
IOmnichainGovernanceExecutor public immutable OMNICHAIN_GOVERNANCE_EXECUTOR;
/**
* @notice Stores function signature corresponding to their 4 bytes hash value
*/
mapping(bytes4 => string) public functionRegistry;
/**
* @notice Event emitted when function registry updated
*/
event FunctionRegistryChanged(string indexed signature, bool active);
/// @custom:oz-upgrades-unsafe-allow constructor
constructor(address omnichainGovernanceExecutor_) {
require(omnichainGovernanceExecutor_ != address(0), "Address must not be zero");
OMNICHAIN_GOVERNANCE_EXECUTOR = IOmnichainGovernanceExecutor(omnichainGovernanceExecutor_);
_disableInitializers();
}
/**
* @notice Initialize the contract
* @param accessControlManager_ Address of access control manager
*/
function initialize(address accessControlManager_) external initializer {
require(accessControlManager_ != address(0), "Address must not be zero");
__AccessControlled_init(accessControlManager_);
}
/**
* @notice Sets the source message sender address
* @param srcChainId_ The LayerZero id of a source chain
* @param srcAddress_ The address of the contract on the source chain
* @custom:access Controlled by AccessControlManager
* @custom:event Emits SetTrustedRemoteAddress with source chain Id and source address
*/
function setTrustedRemoteAddress(uint16 srcChainId_, bytes calldata srcAddress_) external {
_checkAccessAllowed("setTrustedRemoteAddress(uint16,bytes)");
require(srcChainId_ != 0, "ChainId must not be zero");
ensureNonzeroAddress(address(uint160(bytes20(srcAddress_))));
require(srcAddress_.length == 20, "Source address must be 20 bytes long");
OMNICHAIN_GOVERNANCE_EXECUTOR.setTrustedRemoteAddress(srcChainId_, srcAddress_);
}
/**
* @notice Invoked when called function does not exist in the contract
* @param data_ Calldata containing the encoded function call
* @return Result of function call
* @custom:access Controlled by Access Control Manager
*/
fallback(bytes calldata data_) external returns (bytes memory) {
string memory fun = functionRegistry[msg.sig];
require(bytes(fun).length != 0, "Function not found");
_checkAccessAllowed(fun);
(bool ok, bytes memory res) = address(OMNICHAIN_GOVERNANCE_EXECUTOR).call(data_);
require(ok, "call failed");
return res;
}
/**
* @notice A registry of functions that are allowed to be executed from proposals
* @param signatures_ Function signature to be added or removed
* @param active_ bool value, should be true to add function
* @custom:access Only owner
*/
function upsertSignature(string[] calldata signatures_, bool[] calldata active_) external onlyOwner {
uint256 signatureLength = signatures_.length;
require(signatureLength == active_.length, "Input arrays must have the same length");
for (uint256 i; i < signatureLength; ++i) {
bytes4 sigHash = bytes4(keccak256(bytes(signatures_[i])));
bytes memory signature = bytes(functionRegistry[sigHash]);
if (active_[i] && signature.length == 0) {
functionRegistry[sigHash] = signatures_[i];
emit FunctionRegistryChanged(signatures_[i], true);
} else if (!active_[i] && signature.length != 0) {
delete functionRegistry[sigHash];
emit FunctionRegistryChanged(signatures_[i], false);
}
}
}
/**
* @notice This function transfer the ownership of the executor from this contract to new owner
* @param newOwner_ New owner of the governanceExecutor
* @custom:access Controlled by AccessControlManager
*/
function transferBridgeOwnership(address newOwner_) external {
_checkAccessAllowed("transferBridgeOwnership(address)");
require(newOwner_ != address(0), "Address must not be zero");
OMNICHAIN_GOVERNANCE_EXECUTOR.transferOwnership(newOwner_);
}
/**
* @notice Empty implementation of renounce ownership to avoid any mishappening
*/
function renounceOwnership() public virtual override {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (access/Ownable2Step.sol)
pragma solidity ^0.8.0;
import "./OwnableUpgradeable.sol";
import "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which provides 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} and {acceptOwnership}.
*
* This module is used through inheritance. It will make available all functions
* from parent (Ownable).
*/
abstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable {
function __Ownable2Step_init() internal onlyInitializing {
__Ownable_init_unchained();
}
function __Ownable2Step_init_unchained() internal onlyInitializing {
}
address private _pendingOwner;
event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);
/**
* @dev Returns the address of the pending owner.
*/
function pendingOwner() public view virtual returns (address) {
return _pendingOwner;
}
/**
* @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual override onlyOwner {
_pendingOwner = newOwner;
emit OwnershipTransferStarted(owner(), newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual override {
delete _pendingOwner;
super._transferOwnership(newOwner);
}
/**
* @dev The new owner accepts the ownership transfer.
*/
function acceptOwnership() external {
address sender = _msgSender();
require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner");
_transferOwnership(sender);
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
function __Ownable_init() internal onlyInitializing {
__Ownable_init_unchained();
}
function __Ownable_init_unchained() internal onlyInitializing {
_transferOwnership(_msgSender());
}
/**
* @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 {
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);
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.1) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.2;
import "../../utils/AddressUpgradeable.sol";
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
* case an upgrade adds a module that needs to be initialized.
*
* For example:
*
* [.hljs-theme-light.nopadding]
* ```
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
* function initializeV2() reinitializer(2) public {
* __ERC20Permit_init("MyToken");
* }
* }
* ```
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() {
* _disableInitializers();
* }
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
* @custom:oz-retyped-from bool
*/
uint8 private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint8 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts.
*
* Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
* constructor.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
bool isTopLevelCall = !_initializing;
require(
(isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
"Initializable: contract is already initialized"
);
_initialized = 1;
if (isTopLevelCall) {
_initializing = true;
}
_;
if (isTopLevelCall) {
_initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* A reinitializer may be used after the original initialization step. This is essential to configure modules that
* are added through upgrades and that require initialization.
*
* When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
* cannot be nested. If one is invoked in the context of another, execution will revert.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*
* WARNING: setting the version to 255 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint8 version) {
require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
_initialized = version;
_initializing = true;
_;
_initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
require(_initializing, "Initializable: contract is not initializing");
_;
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*
* Emits an {Initialized} event the first time it is successfully executed.
*/
function _disableInitializers() internal virtual {
require(!_initializing, "Initializable: contract is initializing");
if (_initialized < type(uint8).max) {
_initialized = type(uint8).max;
emit Initialized(type(uint8).max);
}
}
/**
* @dev Returns the highest version that has been initialized. See {reinitializer}.
*/
function _getInitializedVersion() internal view returns (uint8) {
return _initialized;
}
/**
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
*/
function _isInitializing() internal view returns (bool) {
return _initializing;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library AddressUpgradeable {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";
/**
* @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 ContextUpgradeable is Initializable {
function __Context_init() internal onlyInitializing {
}
function __Context_init_unchained() internal onlyInitializing {
}
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)
pragma solidity ^0.8.0;
/**
* @dev External interface of AccessControl declared to support ERC165 detection.
*/
interface IAccessControl {
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
*
* _Available since v3.1._
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call, an admin role
* bearer except when using {AccessControl-_setupRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) external view returns (bool);
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {AccessControl-_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) external view returns (bytes32);
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) external;
}// SPDX-License-Identifier: BSD-3-Clause
pragma solidity 0.8.25;
/// @notice Thrown if the supplied address is a zero address where it is not allowed
error ZeroAddressNotAllowed();
/// @notice Thrown if the supplied value is 0 where it is not allowed
error ZeroValueNotAllowed();
/// @notice Checks if the provided address is nonzero, reverts otherwise
/// @param address_ Address to check
/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address
function ensureNonzeroAddress(address address_) pure {
if (address_ == address(0)) {
revert ZeroAddressNotAllowed();
}
}
/// @notice Checks if the provided value is nonzero, reverts otherwise
/// @param value_ Value to check
/// @custom:error ZeroValueNotAllowed is thrown if the provided value is 0
function ensureNonzeroValue(uint256 value_) pure {
if (value_ == 0) {
revert ZeroValueNotAllowed();
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.25;
interface IOmnichainGovernanceExecutor {
/**
* @notice Transfers ownership of the contract to the specified address
* @param addr The address to which ownership will be transferred
*/
function transferOwnership(address addr) external;
/**
* @notice Sets the source message sender address
* @param srcChainId_ The LayerZero id of a source chain
* @param srcAddress_ The address of the contract on the source chain
*/
function setTrustedRemoteAddress(uint16 srcChainId_, bytes calldata srcAddress_) external;
}// SPDX-License-Identifier: BSD-3-Clause
pragma solidity 0.8.25;
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol";
import "./IAccessControlManagerV8.sol";
/**
* @title AccessControlledV8
* @author Venus
* @notice This contract is helper between access control manager and actual contract. This contract further inherited by other contract (using solidity 0.8.13)
* to integrate access controlled mechanism. It provides initialise methods and verifying access methods.
*/
abstract contract AccessControlledV8 is Initializable, Ownable2StepUpgradeable {
/// @notice Access control manager contract
IAccessControlManagerV8 private _accessControlManager;
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
/// @notice Emitted when access control manager contract address is changed
event NewAccessControlManager(address oldAccessControlManager, address newAccessControlManager);
/// @notice Thrown when the action is prohibited by AccessControlManager
error Unauthorized(address sender, address calledContract, string methodSignature);
function __AccessControlled_init(address accessControlManager_) internal onlyInitializing {
__Ownable2Step_init();
__AccessControlled_init_unchained(accessControlManager_);
}
function __AccessControlled_init_unchained(address accessControlManager_) internal onlyInitializing {
_setAccessControlManager(accessControlManager_);
}
/**
* @notice Sets the address of AccessControlManager
* @dev Admin function to set address of AccessControlManager
* @param accessControlManager_ The new address of the AccessControlManager
* @custom:event Emits NewAccessControlManager event
* @custom:access Only Governance
*/
function setAccessControlManager(address accessControlManager_) external onlyOwner {
_setAccessControlManager(accessControlManager_);
}
/**
* @notice Returns the address of the access control manager contract
*/
function accessControlManager() external view returns (IAccessControlManagerV8) {
return _accessControlManager;
}
/**
* @dev Internal function to set address of AccessControlManager
* @param accessControlManager_ The new address of the AccessControlManager
*/
function _setAccessControlManager(address accessControlManager_) internal {
require(address(accessControlManager_) != address(0), "invalid acess control manager address");
address oldAccessControlManager = address(_accessControlManager);
_accessControlManager = IAccessControlManagerV8(accessControlManager_);
emit NewAccessControlManager(oldAccessControlManager, accessControlManager_);
}
/**
* @notice Reverts if the call is not allowed by AccessControlManager
* @param signature Method signature
*/
function _checkAccessAllowed(string memory signature) internal view {
bool isAllowedToCall = _accessControlManager.isAllowedToCall(msg.sender, signature);
if (!isAllowedToCall) {
revert Unauthorized(msg.sender, address(this), signature);
}
}
}// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.25;
import "@openzeppelin/contracts/access/IAccessControl.sol";
/**
* @title IAccessControlManagerV8
* @author Venus
* @notice Interface implemented by the `AccessControlManagerV8` contract.
*/
interface IAccessControlManagerV8 is IAccessControl {
function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;
function revokeCallPermission(
address contractAddress,
string calldata functionSig,
address accountToRevoke
) external;
function isAllowedToCall(address account, string calldata functionSig) external view returns (bool);
function hasPermission(
address account,
address contractAddress,
string calldata functionSig
) external view returns (bool);
}{
"evmVersion": "paris",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs",
"useLiteralContent": true
},
"optimizer": {
"enabled": true,
"runs": 10000
},
"remappings": [],
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract ABI
API[{"inputs":[{"internalType":"address","name":"omnichainGovernanceExecutor_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"calledContract","type":"address"},{"internalType":"string","name":"methodSignature","type":"string"}],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"ZeroAddressNotAllowed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"signature","type":"string"},{"indexed":false,"internalType":"bool","name":"active","type":"bool"}],"name":"FunctionRegistryChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAccessControlManager","type":"address"},{"indexed":false,"internalType":"address","name":"newAccessControlManager","type":"address"}],"name":"NewAccessControlManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","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"},{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[],"name":"OMNICHAIN_GOVERNANCE_EXECUTOR","outputs":[{"internalType":"contract IOmnichainGovernanceExecutor","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"accessControlManager","outputs":[{"internalType":"contract IAccessControlManagerV8","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"name":"functionRegistry","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"accessControlManager_","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"accessControlManager_","type":"address"}],"name":"setAccessControlManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"srcChainId_","type":"uint16"},{"internalType":"bytes","name":"srcAddress_","type":"bytes"}],"name":"setTrustedRemoteAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner_","type":"address"}],"name":"transferBridgeOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string[]","name":"signatures_","type":"string[]"},{"internalType":"bool[]","name":"active_","type":"bool[]"}],"name":"upsertSignature","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60a060405234801561001057600080fd5b50604051611c6d380380611c6d83398101604081905261002f91610161565b6001600160a01b03811661008a5760405162461bcd60e51b815260206004820152601860248201527f41646472657373206d757374206e6f74206265207a65726f000000000000000060448201526064015b60405180910390fd5b6001600160a01b03811660805261009f6100a5565b50610191565b600054610100900460ff161561010d5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152608401610081565b60005460ff908116101561015f576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b60006020828403121561017357600080fd5b81516001600160a01b038116811461018a57600080fd5b9392505050565b608051611aac6101c16000396000818161020701528181610357015281816106aa0152610c640152611aac6000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c806379ba50971161008c578063b4a0bdf311610066578063b4a0bdf3146103d7578063c4d66de8146103f5578063e30c397814610408578063f2fde38b14610426576100df565b806379ba50971461039e5780638da5cb5b146103a6578063a6c3d165146103c4576100df565b80634bb7453e116100bd5780634bb7453e1461033f5780635f21f75e14610352578063715018a614610301576100df565b80630e32cb86146102ee578063180d295c146103035780633f90b5401461032c575b600080357fffffffff0000000000000000000000000000000000000000000000000000000016815260c9602052604081208054369160609184919061012390611429565b80601f016020809104026020016040519081016040528092919081815260200182805461014f90611429565b801561019c5780601f106101715761010080835404028352916020019161019c565b820191906000526020600020905b81548152906001019060200180831161017f57829003601f168201915b5050505050905080516000036101f95760405162461bcd60e51b815260206004820152601260248201527f46756e6374696f6e206e6f7420666f756e64000000000000000000000000000060448201526064015b60405180910390fd5b61020281610439565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16868660405161024c92919061147c565b6000604051808303816000865af19150503d8060008114610289576040519150601f19603f3d011682016040523d82523d6000602084013e61028e565b606091505b5091509150816102e05760405162461bcd60e51b815260206004820152600b60248201527f63616c6c206661696c656400000000000000000000000000000000000000000060448201526064016101f0565b805195506020019350505050f35b6103016102fc36600461148c565b610516565b005b6103166103113660046114c9565b61052a565b604051610323919061156f565b60405180910390f35b61030161033a36600461148c565b6105c4565b61030161034d3660046115ce565b610709565b6103797f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610323565b610301610a90565b60335473ffffffffffffffffffffffffffffffffffffffff16610379565b6103016103d236600461163a565b610b28565b60975473ffffffffffffffffffffffffffffffffffffffff16610379565b61030161040336600461148c565b610cd4565b60655473ffffffffffffffffffffffffffffffffffffffff16610379565b61030161043436600461148c565b610eb1565b6097546040517f18c5e8ab00000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff16906318c5e8ab9061049290339086906004016116c6565b602060405180830381865afa1580156104af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104d3919061170b565b905080610512573330836040517f4a3fa2930000000000000000000000000000000000000000000000000000000081526004016101f093929190611728565b5050565b61051e610f61565b61052781610fc8565b50565b60c9602052600090815260409020805461054390611429565b80601f016020809104026020016040519081016040528092919081815260200182805461056f90611429565b80156105bc5780601f10610591576101008083540402835291602001916105bc565b820191906000526020600020905b81548152906001019060200180831161059f57829003601f168201915b505050505081565b6106026040518060400160405280602081526020017f7472616e736665724272696467654f776e657273686970286164647265737329815250610439565b73ffffffffffffffffffffffffffffffffffffffff81166106655760405162461bcd60e51b815260206004820152601860248201527f41646472657373206d757374206e6f74206265207a65726f000000000000000060448201526064016101f0565b6040517ff2fde38b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063f2fde38b90602401600060405180830381600087803b1580156106ee57600080fd5b505af1158015610702573d6000803e3d6000fd5b5050505050565b610711610f61565b828181146107875760405162461bcd60e51b815260206004820152602660248201527f496e70757420617272617973206d7573742068617665207468652073616d652060448201527f6c656e677468000000000000000000000000000000000000000000000000000060648201526084016101f0565b60005b81811015610a865760008686838181106107a6576107a661176a565b90506020028101906107b89190611799565b6040516107c692919061147c565b60408051918290039091207fffffffff000000000000000000000000000000000000000000000000000000008116600090815260c960205291822080549193509061081090611429565b80601f016020809104026020016040519081016040528092919081815260200182805461083c90611429565b80156108895780601f1061085e57610100808354040283529160200191610889565b820191906000526020600020905b81548152906001019060200180831161086c57829003601f168201915b505050505090508585848181106108a2576108a261176a565b90506020020160208101906108b791906117fe565b80156108c257508051155b1561099b578787848181106108d9576108d961176a565b90506020028101906108eb9190611799565b7fffffffff000000000000000000000000000000000000000000000000000000008416600090815260c96020526040902091610928919083611897565b5087878481811061093b5761093b61176a565b905060200281019061094d9190611799565b60405161095b92919061147c565b60405190819003812060018252907f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa9060200160405180910390a2610a7c565b8585848181106109ad576109ad61176a565b90506020020160208101906109c291906117fe565b1580156109cf5750805115155b15610a7c577fffffffff000000000000000000000000000000000000000000000000000000008216600090815260c960205260408120610a0e916113db565b878784818110610a2057610a2061176a565b9050602002810190610a329190611799565b604051610a4092919061147c565b60405190819003812060008252907f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa9060200160405180910390a25b505060010161078a565b505050505050565b565b606554339073ffffffffffffffffffffffffffffffffffffffff168114610b1f5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e6572000000000000000000000000000000000000000000000060648201526084016101f0565b610527816110d0565b610b49604051806060016040528060258152602001611a5260259139610439565b8261ffff16600003610b9d5760405162461bcd60e51b815260206004820152601860248201527f436861696e4964206d757374206e6f74206265207a65726f000000000000000060448201526064016101f0565b610bb2610baa82846119b1565b60601c611101565b60148114610c275760405162461bcd60e51b8152602060048201526024808201527f536f757263652061646472657373206d7573742062652032302062797465732060448201527f6c6f6e670000000000000000000000000000000000000000000000000000000060648201526084016101f0565b6040517fa6c3d16500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063a6c3d16590610c9d908690869086906004016119f9565b600060405180830381600087803b158015610cb757600080fd5b505af1158015610ccb573d6000803e3d6000fd5b50505050505050565b600054610100900460ff1615808015610cf45750600054600160ff909116105b80610d0e5750303b158015610d0e575060005460ff166001145b610d805760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016101f0565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015610dde57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b73ffffffffffffffffffffffffffffffffffffffff8216610e415760405162461bcd60e51b815260206004820152601860248201527f41646472657373206d757374206e6f74206265207a65726f000000000000000060448201526064016101f0565b610e4a8261114e565b801561051257600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b610eb9610f61565b6065805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff00000000000000000000000000000000000000009091168117909155610f1c60335473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60335473ffffffffffffffffffffffffffffffffffffffff163314610a8e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101f0565b73ffffffffffffffffffffffffffffffffffffffff81166110515760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e6167657220616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016101f0565b6097805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09101610ea5565b606580547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055610527816111dc565b73ffffffffffffffffffffffffffffffffffffffff8116610527576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054610100900460ff166111cb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016101f0565b6111d3611253565b610527816112d8565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166112d05760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016101f0565b610a8e611355565b600054610100900460ff1661051e5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016101f0565b600054610100900460ff166113d25760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016101f0565b610a8e336110d0565b5080546113e790611429565b6000825580601f106113f7575050565b601f01602090049060005260206000209081019061052791905b808211156114255760008155600101611411565b5090565b600181811c9082168061143d57607f821691505b602082108103611476577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b8183823760009101908152919050565b60006020828403121561149e57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146114c257600080fd5b9392505050565b6000602082840312156114db57600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146114c257600080fd5b6000815180845260005b8181101561153157602081850181015186830182015201611515565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b6020815260006114c2602083018461150b565b60008083601f84011261159457600080fd5b50813567ffffffffffffffff8111156115ac57600080fd5b6020830191508360208260051b85010111156115c757600080fd5b9250929050565b600080600080604085870312156115e457600080fd5b843567ffffffffffffffff808211156115fc57600080fd5b61160888838901611582565b9096509450602087013591508082111561162157600080fd5b5061162e87828801611582565b95989497509550505050565b60008060006040848603121561164f57600080fd5b833561ffff8116811461166157600080fd5b9250602084013567ffffffffffffffff8082111561167e57600080fd5b818601915086601f83011261169257600080fd5b8135818111156116a157600080fd5b8760208285010111156116b357600080fd5b6020830194508093505050509250925092565b73ffffffffffffffffffffffffffffffffffffffff831681526040602082015260006116f5604083018461150b565b949350505050565b801515811461052757600080fd5b60006020828403121561171d57600080fd5b81516114c2816116fd565b600073ffffffffffffffffffffffffffffffffffffffff808616835280851660208401525060606040830152611761606083018461150b565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126117ce57600080fd5b83018035915067ffffffffffffffff8211156117e957600080fd5b6020019150368190038213156115c757600080fd5b60006020828403121561181057600080fd5b81356114c2816116fd565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b601f821115611892576000816000526020600020601f850160051c810160208610156118735750805b601f850160051c820191505b81811015610a865782815560010161187f565b505050565b67ffffffffffffffff8311156118af576118af61181b565b6118c3836118bd8354611429565b8361184a565b6000601f84116001811461191557600085156118df5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355610702565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156119645786850135825560209485019460019092019101611944565b508682101561199f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156119f15780818660140360031b1b83161692505b505092915050565b61ffff8416815260406020820152816040820152818360608301376000818301606090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01601019291505056fe7365745472757374656452656d6f7465416464726573732875696e7431362c627974657329a2646970667358221220f18c05c7a1cc2ae688a65f755300a96ac7320b73e464ed2dcd0d6f13765fdceb64736f6c634300081900330000000000000000000000004fd69a0821e35104fc86b8b7ff09026956b45947
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100df5760003560e01c806379ba50971161008c578063b4a0bdf311610066578063b4a0bdf3146103d7578063c4d66de8146103f5578063e30c397814610408578063f2fde38b14610426576100df565b806379ba50971461039e5780638da5cb5b146103a6578063a6c3d165146103c4576100df565b80634bb7453e116100bd5780634bb7453e1461033f5780635f21f75e14610352578063715018a614610301576100df565b80630e32cb86146102ee578063180d295c146103035780633f90b5401461032c575b600080357fffffffff0000000000000000000000000000000000000000000000000000000016815260c9602052604081208054369160609184919061012390611429565b80601f016020809104026020016040519081016040528092919081815260200182805461014f90611429565b801561019c5780601f106101715761010080835404028352916020019161019c565b820191906000526020600020905b81548152906001019060200180831161017f57829003601f168201915b5050505050905080516000036101f95760405162461bcd60e51b815260206004820152601260248201527f46756e6374696f6e206e6f7420666f756e64000000000000000000000000000060448201526064015b60405180910390fd5b61020281610439565b6000807f0000000000000000000000004fd69a0821e35104fc86b8b7ff09026956b4594773ffffffffffffffffffffffffffffffffffffffff16868660405161024c92919061147c565b6000604051808303816000865af19150503d8060008114610289576040519150601f19603f3d011682016040523d82523d6000602084013e61028e565b606091505b5091509150816102e05760405162461bcd60e51b815260206004820152600b60248201527f63616c6c206661696c656400000000000000000000000000000000000000000060448201526064016101f0565b805195506020019350505050f35b6103016102fc36600461148c565b610516565b005b6103166103113660046114c9565b61052a565b604051610323919061156f565b60405180910390f35b61030161033a36600461148c565b6105c4565b61030161034d3660046115ce565b610709565b6103797f0000000000000000000000004fd69a0821e35104fc86b8b7ff09026956b4594781565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610323565b610301610a90565b60335473ffffffffffffffffffffffffffffffffffffffff16610379565b6103016103d236600461163a565b610b28565b60975473ffffffffffffffffffffffffffffffffffffffff16610379565b61030161040336600461148c565b610cd4565b60655473ffffffffffffffffffffffffffffffffffffffff16610379565b61030161043436600461148c565b610eb1565b6097546040517f18c5e8ab00000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff16906318c5e8ab9061049290339086906004016116c6565b602060405180830381865afa1580156104af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104d3919061170b565b905080610512573330836040517f4a3fa2930000000000000000000000000000000000000000000000000000000081526004016101f093929190611728565b5050565b61051e610f61565b61052781610fc8565b50565b60c9602052600090815260409020805461054390611429565b80601f016020809104026020016040519081016040528092919081815260200182805461056f90611429565b80156105bc5780601f10610591576101008083540402835291602001916105bc565b820191906000526020600020905b81548152906001019060200180831161059f57829003601f168201915b505050505081565b6106026040518060400160405280602081526020017f7472616e736665724272696467654f776e657273686970286164647265737329815250610439565b73ffffffffffffffffffffffffffffffffffffffff81166106655760405162461bcd60e51b815260206004820152601860248201527f41646472657373206d757374206e6f74206265207a65726f000000000000000060448201526064016101f0565b6040517ff2fde38b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f0000000000000000000000004fd69a0821e35104fc86b8b7ff09026956b45947169063f2fde38b90602401600060405180830381600087803b1580156106ee57600080fd5b505af1158015610702573d6000803e3d6000fd5b5050505050565b610711610f61565b828181146107875760405162461bcd60e51b815260206004820152602660248201527f496e70757420617272617973206d7573742068617665207468652073616d652060448201527f6c656e677468000000000000000000000000000000000000000000000000000060648201526084016101f0565b60005b81811015610a865760008686838181106107a6576107a661176a565b90506020028101906107b89190611799565b6040516107c692919061147c565b60408051918290039091207fffffffff000000000000000000000000000000000000000000000000000000008116600090815260c960205291822080549193509061081090611429565b80601f016020809104026020016040519081016040528092919081815260200182805461083c90611429565b80156108895780601f1061085e57610100808354040283529160200191610889565b820191906000526020600020905b81548152906001019060200180831161086c57829003601f168201915b505050505090508585848181106108a2576108a261176a565b90506020020160208101906108b791906117fe565b80156108c257508051155b1561099b578787848181106108d9576108d961176a565b90506020028101906108eb9190611799565b7fffffffff000000000000000000000000000000000000000000000000000000008416600090815260c96020526040902091610928919083611897565b5087878481811061093b5761093b61176a565b905060200281019061094d9190611799565b60405161095b92919061147c565b60405190819003812060018252907f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa9060200160405180910390a2610a7c565b8585848181106109ad576109ad61176a565b90506020020160208101906109c291906117fe565b1580156109cf5750805115155b15610a7c577fffffffff000000000000000000000000000000000000000000000000000000008216600090815260c960205260408120610a0e916113db565b878784818110610a2057610a2061176a565b9050602002810190610a329190611799565b604051610a4092919061147c565b60405190819003812060008252907f9d424e54f4d851aabd288f6cc4946e5726d6b5c0e66ea4ef159a3c40bcc470fa9060200160405180910390a25b505060010161078a565b505050505050565b565b606554339073ffffffffffffffffffffffffffffffffffffffff168114610b1f5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e6572000000000000000000000000000000000000000000000060648201526084016101f0565b610527816110d0565b610b49604051806060016040528060258152602001611a5260259139610439565b8261ffff16600003610b9d5760405162461bcd60e51b815260206004820152601860248201527f436861696e4964206d757374206e6f74206265207a65726f000000000000000060448201526064016101f0565b610bb2610baa82846119b1565b60601c611101565b60148114610c275760405162461bcd60e51b8152602060048201526024808201527f536f757263652061646472657373206d7573742062652032302062797465732060448201527f6c6f6e670000000000000000000000000000000000000000000000000000000060648201526084016101f0565b6040517fa6c3d16500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004fd69a0821e35104fc86b8b7ff09026956b45947169063a6c3d16590610c9d908690869086906004016119f9565b600060405180830381600087803b158015610cb757600080fd5b505af1158015610ccb573d6000803e3d6000fd5b50505050505050565b600054610100900460ff1615808015610cf45750600054600160ff909116105b80610d0e5750303b158015610d0e575060005460ff166001145b610d805760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016101f0565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015610dde57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b73ffffffffffffffffffffffffffffffffffffffff8216610e415760405162461bcd60e51b815260206004820152601860248201527f41646472657373206d757374206e6f74206265207a65726f000000000000000060448201526064016101f0565b610e4a8261114e565b801561051257600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b610eb9610f61565b6065805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff00000000000000000000000000000000000000009091168117909155610f1c60335473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60335473ffffffffffffffffffffffffffffffffffffffff163314610a8e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101f0565b73ffffffffffffffffffffffffffffffffffffffff81166110515760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e6167657220616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016101f0565b6097805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09101610ea5565b606580547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055610527816111dc565b73ffffffffffffffffffffffffffffffffffffffff8116610527576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054610100900460ff166111cb5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016101f0565b6111d3611253565b610527816112d8565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166112d05760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016101f0565b610a8e611355565b600054610100900460ff1661051e5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016101f0565b600054610100900460ff166113d25760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016101f0565b610a8e336110d0565b5080546113e790611429565b6000825580601f106113f7575050565b601f01602090049060005260206000209081019061052791905b808211156114255760008155600101611411565b5090565b600181811c9082168061143d57607f821691505b602082108103611476577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b8183823760009101908152919050565b60006020828403121561149e57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146114c257600080fd5b9392505050565b6000602082840312156114db57600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146114c257600080fd5b6000815180845260005b8181101561153157602081850181015186830182015201611515565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b6020815260006114c2602083018461150b565b60008083601f84011261159457600080fd5b50813567ffffffffffffffff8111156115ac57600080fd5b6020830191508360208260051b85010111156115c757600080fd5b9250929050565b600080600080604085870312156115e457600080fd5b843567ffffffffffffffff808211156115fc57600080fd5b61160888838901611582565b9096509450602087013591508082111561162157600080fd5b5061162e87828801611582565b95989497509550505050565b60008060006040848603121561164f57600080fd5b833561ffff8116811461166157600080fd5b9250602084013567ffffffffffffffff8082111561167e57600080fd5b818601915086601f83011261169257600080fd5b8135818111156116a157600080fd5b8760208285010111156116b357600080fd5b6020830194508093505050509250925092565b73ffffffffffffffffffffffffffffffffffffffff831681526040602082015260006116f5604083018461150b565b949350505050565b801515811461052757600080fd5b60006020828403121561171d57600080fd5b81516114c2816116fd565b600073ffffffffffffffffffffffffffffffffffffffff808616835280851660208401525060606040830152611761606083018461150b565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126117ce57600080fd5b83018035915067ffffffffffffffff8211156117e957600080fd5b6020019150368190038213156115c757600080fd5b60006020828403121561181057600080fd5b81356114c2816116fd565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b601f821115611892576000816000526020600020601f850160051c810160208610156118735750805b601f850160051c820191505b81811015610a865782815560010161187f565b505050565b67ffffffffffffffff8311156118af576118af61181b565b6118c3836118bd8354611429565b8361184a565b6000601f84116001811461191557600085156118df5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355610702565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156119645786850135825560209485019460019092019101611944565b508682101561199f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156119f15780818660140360031b1b83161692505b505092915050565b61ffff8416815260406020820152816040820152818360608301376000818301606090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01601019291505056fe7365745472757374656452656d6f7465416464726573732875696e7431362c627974657329a2646970667358221220f18c05c7a1cc2ae688a65f755300a96ac7320b73e464ed2dcd0d6f13765fdceb64736f6c63430008190033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000004fd69a0821e35104fc86b8b7ff09026956b45947
-----Decoded View---------------
Arg [0] : omnichainGovernanceExecutor_ (address): 0x4FD69A0821e35104Fc86B8B7fF09026956B45947
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000004fd69a0821e35104fc86b8b7ff09026956b45947
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.