Address Contract Partially Verified
Address
0x54a8757c2FEF8649830b158a8C19D3a670e80318
Balance
0 ETH
Nonce
1
Code Size
1403 bytes
Creator
0x54b5Aae5...F4ad at tx 0xd2ba5c3e...5b41ec
Indexed Transactions
0
Contract Bytecode
1403 bytes
0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a2958b8311610066578063a2958b8314610108578063c56cd8ca1461011b578063e30c39781461012e578063f2fde38b1461013f578063f89817891461015257600080fd5b806303cad645146100a35780636290865d146100d2578063715018a6146100e557806379ba5097146100ef5780638da5cb5b146100f7575b600080fd5b6003546100b6906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b6002546100b6906001600160a01b031681565b6100ed610165565b005b6100ed6101a4565b6000546001600160a01b03166100b6565b6100ed6101163660046104e0565b61021e565b6100ed6101293660046104e0565b61028a565b6001546001600160a01b03166100b6565b6100ed61014d3660046104e0565b610337565b6100ed6101603660046104e0565b6103ca565b6000546001600160a01b031633146101985760405162461bcd60e51b815260040161018f90610510565b60405180910390fd5b6101a260006104c7565b565b60015433906001600160a01b031681146102125760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161018f565b61021b816104c7565b50565b6002546003546040516334dae8d560e01b81526001600160a01b03918216600482015283821660248201529116906334dae8d590604401600060405180830381600087803b15801561026f57600080fd5b505af1158015610283573d6000803e3d6000fd5b5050505050565b6000546001600160a01b031633146102b45760405162461bcd60e51b815260040161018f90610510565b6001600160a01b0381166102db576040516318c3537b60e01b815260040160405180910390fd5b6003546040516001600160a01b038084169216907f631e0d42f51fede8b45e1f4d7e1552b7782304409425350196046bb18d0dfe1a90600090a3600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146103615760405162461bcd60e51b815260040161018f90610510565b600180546001600160a01b0383166001600160a01b031990911681179091556103926000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000546001600160a01b031633146103f45760405162461bcd60e51b815260040161018f90610510565b6001600160a01b03811661041b576040516328a7293960e21b815260040160405180910390fd5b6002546040516001600160a01b038084169216907f12f44a0fc4b932332de2e987123a00d8e239e0c9785dc5c8d05f9a41ea7a42ef90600090a3600280546001600160a01b0319166001600160a01b0392909216919091179055565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600180546001600160a01b031916905561021b81610477565b6000602082840312156104f257600080fd5b81356001600160a01b038116811461050957600080fd5b9392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fea2646970667358221220cfd55bbc5ed81265eacfe555154b344f2d5a83ec07d0417006b18cf68d754b4064736f6c63430008100033
Verified Source Code Partial Match
Compiler: v0.8.16+commit.07a7930e
EVM: london
Optimization: Yes (200 runs)
OndoComplianceGMView.sol 106 lines
// SPDX-License-Identifier: BUSL-1.1
/*
▄▄█████████▄
╓██▀└ ,╓▄▄▄, '▀██▄
██▀ ▄██▀▀╙╙▀▀██▄ └██µ ,, ,, , ,,, ,,,
██ ,██¬ ▄████▄ ▀█▄ ╙█▄ ▄███▀▀███▄ ███▄ ██ ███▀▀▀███▄ ▄███▀▀███,
██ ██ ╒█▀' ╙█▌ ╙█▌ ██ ▐██ ███ █████, ██ ██▌ └██▌ ██▌ └██▌
██ ▐█▌ ██ ╟█ █▌ ╟█ ██▌ ▐██ ██ └███ ██ ██▌ ╟██ j██ ╟██
╟█ ██ ╙██ ▄█▀ ▐█▌ ██ ╙██ ██▌ ██ ╙████ ██▌ ▄██▀ ██▌ ,██▀
██ "██, ╙▀▀███████████⌐ ╙████████▀ ██ ╙██ ███████▀▀ ╙███████▀`
██▄ ╙▀██▄▄▄▄▄,,, ¬─ '─¬
╙▀██▄ '╙╙╙▀▀▀▀▀▀▀▀
╙▀▀██████R⌐
*/
pragma solidity 0.8.16;
import "contracts/xManager/interfaces/IOndoCompliance.sol";
import "contracts/globalMarkets/gmTokenCompliance/IOndoComplianceGMView.sol";
import "contracts/external/openzeppelin/contracts/access/Ownable2Step.sol";
/**
* @title OndoComplianceGMView
* @author Ondo Finance
* @notice The OndoComplianceGMView contract is a read-only view of the OndoCompliance contract.
* @dev This contracts exist to consolidate all GM Tokens under one address allowing for
* ease of future changes in the compliance implementation and backwards compatibility
* with existing systems. All GM compliance clients should point to this contract rather
* than going directly to OndoCompliance.
*/
contract OndoComplianceGMView is IOndoComplianceGMView, Ownable2Step {
/// The OndoCompliance contract
IOndoCompliance public compliance;
/// The address used to denote all GM tokens
address public gmIdentifier =
address(uint160(uint256(keccak256(abi.encodePacked("global_markets")))));
/**
* @notice Emitted when the OndoCompliance contract address is set
* @param oldCompliance The old OndoCompliance contract address
* @param newCompliance The new OndoCompliance contract address
*/
event ComplianceSet(
address indexed oldCompliance,
address indexed newCompliance
);
/**
* @notice Emitted when the GM identifier is set
* @param oldGMIdentifier The old GM identifier
* @param newGMIdentifier The new GM identifier
*/
event GMIdentifierSet(
address indexed oldGMIdentifier,
address indexed newGMIdentifier
);
/// Error emitted when attempting to set the compliance address to zero
error ComplianceAddressCannotBeZero();
/// Error emitted when attempting to set the GM identifier to zero
error GMIdentifierCannotBeZero();
/**
* @param _ondoCompliance The address of the OndoCompliance contract
*/
constructor(address _ondoCompliance) {
if (_ondoCompliance == address(0)) {
revert ComplianceAddressCannotBeZero();
}
_transferOwnership(msg.sender);
compliance = IOndoCompliance(_ondoCompliance);
}
/**
* @notice Checks if a user is compliant with the GM token standards
* @param user The address of the user to check
*/
function checkIsCompliant(address user) external override {
compliance.checkIsCompliant(gmIdentifier, user);
}
/**
* @notice Sets the compliance address OndoCompliance contract
* @param _compliance The address of the new compliance contract
*/
function setCompliance(address _compliance) external onlyOwner {
if (_compliance == address(0)) {
revert ComplianceAddressCannotBeZero();
}
emit ComplianceSet(address(compliance), _compliance);
compliance = IOndoCompliance(_compliance);
}
/**
* @notice Sets the GM identifier address
* @param _gmIdentifier The new GM identifier address
*/
function setGMIdentifier(address _gmIdentifier) external onlyOwner {
if (_gmIdentifier == address(0)) {
revert GMIdentifierCannotBeZero();
}
emit GMIdentifierSet(gmIdentifier, _gmIdentifier);
gmIdentifier = _gmIdentifier;
}
}
IOndoCompliance.sol 19 lines
// SPDX-License-Identifier: BUSL-1.1
/*
▄▄█████████▄
╓██▀└ ,╓▄▄▄, '▀██▄
██▀ ▄██▀▀╙╙▀▀██▄ └██µ ,, ,, , ,,, ,,,
██ ,██¬ ▄████▄ ▀█▄ ╙█▄ ▄███▀▀███▄ ███▄ ██ ███▀▀▀███▄ ▄███▀▀███,
██ ██ ╒█▀' ╙█▌ ╙█▌ ██ ▐██ ███ █████, ██ ██▌ └██▌ ██▌ └██▌
██ ▐█▌ ██ ╟█ █▌ ╟█ ██▌ ▐██ ██ └███ ██ ██▌ ╟██ j██ ╟██
╟█ ██ ╙██ ▄█▀ ▐█▌ ██ ╙██ ██▌ ██ ╙████ ██▌ ▄██▀ ██▌ ,██▀
██ "██, ╙▀▀███████████⌐ ╙████████▀ ██ ╙██ ███████▀▀ ╙███████▀`
██▄ ╙▀██▄▄▄▄▄,,, ¬─ '─¬
╙▀██▄ '╙╙╙▀▀▀▀▀▀▀▀
╙▀▀██████R⌐
*/
pragma solidity 0.8.16;
interface IOndoCompliance {
function checkIsCompliant(address rwaToken, address user) external;
}
IOndoComplianceGMView.sol 24 lines
// SPDX-License-Identifier: BUSL-1.1
/*
▄▄█████████▄
╓██▀└ ,╓▄▄▄, '▀██▄
██▀ ▄██▀▀╙╙▀▀██▄ └██µ ,, ,, , ,,, ,,,
██ ,██¬ ▄████▄ ▀█▄ ╙█▄ ▄███▀▀███▄ ███▄ ██ ███▀▀▀███▄ ▄███▀▀███,
██ ██ ╒█▀' ╙█▌ ╙█▌ ██ ▐██ ███ █████, ██ ██▌ └██▌ ██▌ └██▌
██ ▐█▌ ██ ╟█ █▌ ╟█ ██▌ ▐██ ██ └███ ██ ██▌ ╟██ j██ ╟██
╟█ ██ ╙██ ▄█▀ ▐█▌ ██ ╙██ ██▌ ██ ╙████ ██▌ ▄██▀ ██▌ ,██▀
██ "██, ╙▀▀███████████⌐ ╙████████▀ ██ ╙██ ███████▀▀ ╙███████▀`
██▄ ╙▀██▄▄▄▄▄,,, ¬─ '─¬
╙▀██▄ '╙╙╙▀▀▀▀▀▀▀▀
╙▀▀██████R⌐
*/
pragma solidity 0.8.16;
/**
* @title IOndoComplianceGMView
* @author Ondo Finance
* @notice Provides an interface for compliance checks on GM tokens.
*/
interface IOndoComplianceGMView {
function checkIsCompliant(address user) external;
}
Ownable2Step.sol 57 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (access/Ownable2Step.sol)
pragma solidity ^0.8.0;
import "./Ownable.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 Ownable2Step is Ownable {
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() public virtual {
address sender = _msgSender();
require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner");
_transferOwnership(sender);
}
}
Ownable.sol 79 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)
pragma solidity ^0.8.0;
import "contracts/external/openzeppelin/contracts/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.
*
* 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 Ownable is Context {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
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);
}
}
Context.sol 24 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @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;
}
}
Read Contract
compliance 0x6290865d → address
gmIdentifier 0x03cad645 → address
owner 0x8da5cb5b → address
pendingOwner 0xe30c3978 → address
Write Contract 6 functions
These functions modify contract state and require a wallet transaction to execute.
acceptOwnership 0x79ba5097
No parameters
checkIsCompliant 0xa2958b83
address user
renounceOwnership 0x715018a6
No parameters
setCompliance 0xf8981789
address _compliance
setGMIdentifier 0xc56cd8ca
address _gmIdentifier
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
No transactions found for this address