Overview
S Balance
S Value
Less Than $0.01 (@ $0.71/S)More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Mint SUSD | 10254075 | 20 hrs ago | IN | 0.01 S | 0.00614845 |
Latest 1 internal transaction
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
10254075 | 20 hrs ago | 0.0001 S |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x9744a364...5a48287a4 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
SUSDPrinter
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; interface ISonicDollar { function mint(address to, uint256 amount) external; function burn(address from, uint256 amount) external; } interface IPyth { struct Price { int64 price; uint64 conf; int32 expo; uint publishTime; } function getPriceUnsafe(bytes32 priceId) external view returns (Price memory price); function getPrice(bytes32 priceId) external view returns (Price memory price); } import "@openzeppelin/contracts/utils/Pausable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; contract SUSDPrinter is Pausable, AccessControl { bytes32 public constant DAO_ROLE = keccak256("DAO_ROLE"); ISonicDollar public susd; address public bondContract; address public daoTreasury; IPyth public immutable PYTH_ORACLE; bytes32 public constant S_PRICE_FEED_ID = 0xf490b178d0c85683b7a0f2388b40af2e6f7c90cbe0f96b31f315f08d0e5a2d6d; uint256 public seignorageFee = 100; // 1% initial fee (100 = 1%) event SUSDMinted(address indexed user, uint256 sAmount, uint256 susdAmount, uint256 fee); event SUSDBurned(address indexed user, uint256 susdAmount, uint256 sAmount, uint256 fee); event SeignorageFeeSent(uint256 amount); event BondContractSet(address indexed newBondContract); event SeignorageFeeChanged(uint256 newFee); event DAOTreasuryChanged(address indexed newTreasury); constructor( address _susdToken, address _daoTreasury, address _pythOracle ) { require(_susdToken != address(0), "Invalid SUSD address"); require(_daoTreasury != address(0), "Invalid treasury address"); require(_pythOracle != address(0), "Invalid Pyth oracle address"); _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); _grantRole(DAO_ROLE, msg.sender); susd = ISonicDollar(_susdToken); daoTreasury = _daoTreasury; PYTH_ORACLE = IPyth(_pythOracle); } function mintSUSD() external payable whenNotPaused { require(msg.value > 0, "Must send S tokens"); uint256 sPrice = getSPrice(); uint256 fee = _calculateFee(msg.value); uint256 sAmountAfterFee = msg.value - fee; uint256 susdAmount = (sAmountAfterFee * sPrice) / 1e6; // Assuming 6 decimals for price feed // Send fee to treasury (bool success, ) = daoTreasury.call{value: fee}(""); require(success, "Fee transfer failed"); // Mint SUSD susd.mint(msg.sender, susdAmount); emit SUSDMinted(msg.sender, msg.value, susdAmount, fee); emit SeignorageFeeSent(fee); } function burnSUSD(uint256 susdAmount) external whenNotPaused { require(susdAmount > 0, "Amount must be greater than 0"); uint256 sPrice = getSPrice(); uint256 sAmount = (susdAmount * 1e6) / sPrice; // Convert back to S tokens uint256 fee = _calculateFee(sAmount); uint256 sAmountAfterFee = sAmount - fee; require(address(this).balance >= sAmountAfterFee, "Insufficient S balance"); // Burn SUSD first susd.burn(msg.sender, susdAmount); // Send S tokens to user (bool success, ) = msg.sender.call{value: sAmountAfterFee}(""); require(success, "S transfer failed"); // Send fee to treasury (success, ) = daoTreasury.call{value: fee}(""); require(success, "Fee transfer failed"); emit SUSDBurned(msg.sender, susdAmount, sAmount, fee); emit SeignorageFeeSent(fee); } function getSPrice() public view returns (uint256) { IPyth.Price memory price = PYTH_ORACLE.getPrice(S_PRICE_FEED_ID); // price.price is the price in the base unit (e.g., 75074540) // price.expo is the exponent (e.g., -8) // So real price is: 75074540 * 10^(-8) = 0.75074540 USD int64 priceValue = price.price; int32 exponent = price.expo; // Convert to positive value uint256 absolutePrice = uint256(uint64(priceValue >= 0 ? priceValue : -priceValue)); // Convert to 6 decimals for SUSD // If expo is -8, and we want 6 decimals, we need to divide by 10^2 // Because: 10^(-8) * 10^6 = 10^(-2) uint256 decimalAdjustment = uint32(-exponent) - 6; if (decimalAdjustment > 0) { absolutePrice = absolutePrice / (10 ** decimalAdjustment); } require(absolutePrice > 0, "Invalid price"); require(priceValue >= 0, "Negative price not supported"); return absolutePrice; } function getSUSDPrice() public pure returns (uint256) { return 1e6; // $1.00 with 6 decimals } function _calculateFee(uint256 amount) internal view returns (uint256) { return (amount * seignorageFee) / 10000; } function setSeignorageFee(uint256 _fee) external onlyRole(DAO_ROLE) { seignorageFee = _fee; emit SeignorageFeeChanged(_fee); } function setDAOTreasury(address _treasury) external onlyRole(DAO_ROLE) { require(_treasury != address(0), "Invalid treasury address"); daoTreasury = _treasury; emit DAOTreasuryChanged(_treasury); } function pause() external onlyRole(DAO_ROLE) { _pause(); } function unpause() external onlyRole(DAO_ROLE) { _unpause(); } receive() external payable {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol) pragma solidity ^0.8.20; import {IAccessControl} from "./IAccessControl.sol"; import {Context} from "../utils/Context.sol"; import {ERC165} from "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ```solidity * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ```solidity * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} * to enforce additional security measures for this role. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address account => bool) hasRole; bytes32 adminRole; } mapping(bytes32 role => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with an {AccessControlUnauthorizedAccount} error including the required role. */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual returns (bool) { return _roles[role].hasRole[account]; } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()` * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier. */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account` * is missing `role`. */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert AccessControlUnauthorizedAccount(account, role); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) { return _roles[role].adminRole; } /** * @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. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @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 revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `callerConfirmation`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address callerConfirmation) public virtual { if (callerConfirmation != _msgSender()) { revert AccessControlBadConfirmation(); } _revokeRole(role, callerConfirmation); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual returns (bool) { if (!hasRole(role, account)) { _roles[role].hasRole[account] = true; emit RoleGranted(role, account, _msgSender()); return true; } else { return false; } } /** * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual returns (bool) { if (hasRole(role, account)) { _roles[role].hasRole[account] = false; emit RoleRevoked(role, account, _msgSender()); return true; } else { return false; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (access/IAccessControl.sol) pragma solidity ^0.8.20; /** * @dev External interface of AccessControl declared to support ERC-165 detection. */ interface IAccessControl { /** * @dev The `account` is missing a role. */ error AccessControlUnauthorizedAccount(address account, bytes32 neededRole); /** * @dev The caller of a function is not the expected one. * * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}. */ error AccessControlBadConfirmation(); /** * @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. */ 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. This account bears the admin role (for the granted role). * Expected in cases where the role was granted using the internal {AccessControl-_grantRole}. */ 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 `callerConfirmation`. */ function renounceRole(bytes32 role, address callerConfirmation) external; }
// 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: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[ERC]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { bool private _paused; /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); /** * @dev The operation failed because the contract is paused. */ error EnforcedPause(); /** * @dev The operation failed because the contract is not paused. */ error ExpectedPause(); /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { if (paused()) { revert EnforcedPause(); } } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { if (!paused()) { revert ExpectedPause(); } } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_susdToken","type":"address"},{"internalType":"address","name":"_daoTreasury","type":"address"},{"internalType":"address","name":"_pythOracle","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newBondContract","type":"address"}],"name":"BondContractSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newTreasury","type":"address"}],"name":"DAOTreasuryChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"susdAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"SUSDBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"sAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"susdAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"SUSDMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"SeignorageFeeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"SeignorageFeeSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DAO_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PYTH_ORACLE","outputs":[{"internalType":"contract IPyth","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"S_PRICE_FEED_ID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bondContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"susdAmount","type":"uint256"}],"name":"burnSUSD","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"daoTreasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSUSDPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintSUSD","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"seignorageFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"}],"name":"setDAOTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setSeignorageFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"susd","outputs":[{"internalType":"contract ISonicDollar","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Deployed Bytecode
0x6080604052600436106101445760003560e01c806367c5f1c7116100b6578063b59876d21161006f578063b59876d214610386578063c9257775146103a6578063d547741f146103c6578063e7004a7a146103e6578063e9c2651814610406578063ea43efdd1461042857600080fd5b806367c5f1c7146102ff57806379022a9f146103145780638456cb591461033457806391d1485414610349578063a217fddf14610369578063a4f8ec271461037e57600080fd5b80632f2ff15d116101085780632f2ff15d146102485780633270ef7d1461026857806336568abe1461029c5780633f4ba83a146102bc5780635c975abb146102d1578063616952e7146102e957600080fd5b806301ffc9a7146101505780630977e811146101855780631285cc2a146101d1578063248a9ca3146101f55780632978dc3c1461022657600080fd5b3661014b57005b600080fd5b34801561015c57600080fd5b5061017061016b366004610f61565b610448565b60405190151581526020015b60405180910390f35b34801561019157600080fd5b506101b97f0000000000000000000000002880ab155794e7179c9ee2e38200202908c17b4381565b6040516001600160a01b03909116815260200161017c565b3480156101dd57600080fd5b506101e760055481565b60405190815260200161017c565b34801561020157600080fd5b506101e7610210366004610f92565b6000908152600160208190526040909120015490565b34801561023257600080fd5b50610246610241366004610fc7565b61047f565b005b34801561025457600080fd5b50610246610263366004610fe2565b61053d565b34801561027457600080fd5b506101e77ff490b178d0c85683b7a0f2388b40af2e6f7c90cbe0f96b31f315f08d0e5a2d6d81565b3480156102a857600080fd5b506102466102b7366004610fe2565b610569565b3480156102c857600080fd5b506102466105a1565b3480156102dd57600080fd5b5060005460ff16610170565b3480156102f557600080fd5b50620f42406101e7565b34801561030b57600080fd5b506101e76105c4565b34801561032057600080fd5b506004546101b9906001600160a01b031681565b34801561034057600080fd5b50610246610780565b34801561035557600080fd5b50610170610364366004610fe2565b6107a0565b34801561037557600080fd5b506101e7600081565b6102466107cb565b34801561039257600080fd5b506102466103a1366004610f92565b6109d8565b3480156103b257600080fd5b506002546101b9906001600160a01b031681565b3480156103d257600080fd5b506102466103e1366004610fe2565b610cc5565b3480156103f257600080fd5b506003546101b9906001600160a01b031681565b34801561041257600080fd5b506101e760008051602061128083398151915281565b34801561043457600080fd5b50610246610443366004610f92565b610ceb565b60006001600160e01b03198216637965db0b60e01b148061047957506301ffc9a760e01b6001600160e01b03198316145b92915050565b60008051602061128083398151915261049781610d3f565b6001600160a01b0382166104f25760405162461bcd60e51b815260206004820152601860248201527f496e76616c69642074726561737572792061646472657373000000000000000060448201526064015b60405180910390fd5b600480546001600160a01b0319166001600160a01b0384169081179091556040517f14384f8f15ccbcc2d98fea8db010b20339d9328bc367666588d91af490b8bde390600090a25050565b6000828152600160208190526040909120015461055981610d3f565b6105638383610d49565b50505050565b6001600160a01b03811633146105925760405163334bd91960e11b815260040160405180910390fd5b61059c8282610dc2565b505050565b6000805160206112808339815191526105b981610d3f565b6105c1610e2f565b50565b6040516331d98b3f60e01b81527ff490b178d0c85683b7a0f2388b40af2e6f7c90cbe0f96b31f315f08d0e5a2d6d600482015260009081907f0000000000000000000000002880ab155794e7179c9ee2e38200202908c17b436001600160a01b0316906331d98b3f90602401608060405180830381865afa15801561064d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106719190611038565b80516040820151919250906000600783900b81131561069857610693836110de565b61069a565b825b67ffffffffffffffff169050600060066106b384611105565b6106bd919061111f565b63ffffffff16905080156106e3576106d681600a611227565b6106e09083611233565b91505b600082116107235760405162461bcd60e51b815260206004820152600d60248201526c496e76616c696420707269636560981b60448201526064016104e9565b60008460070b12156107775760405162461bcd60e51b815260206004820152601c60248201527f4e65676174697665207072696365206e6f7420737570706f727465640000000060448201526064016104e9565b50949350505050565b60008051602061128083398151915261079881610d3f565b6105c1610e81565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6107d3610ebe565b600034116108185760405162461bcd60e51b81526020600482015260126024820152714d7573742073656e64205320746f6b656e7360701b60448201526064016104e9565b60006108226105c4565b9050600061082f34610ee4565b9050600061083d8234611255565b90506000620f424061084f8584611268565b6108599190611233565b6004546040519192506000916001600160a01b039091169085908381818185875af1925050503d80600081146108ab576040519150601f19603f3d011682016040523d82523d6000602084013e6108b0565b606091505b50509050806108f75760405162461bcd60e51b8152602060048201526013602482015272119959481d1c985b9cd9995c8819985a5b1959606a1b60448201526064016104e9565b6002546040516340c10f1960e01b8152336004820152602481018490526001600160a01b03909116906340c10f1990604401600060405180830381600087803b15801561094357600080fd5b505af1158015610957573d6000803e3d6000fd5b505060408051348152602081018690529081018790523392507f1e87ff337a7baa67f32bf051ab58ebfea8d31ae72cf23972b2485e61eb3b176f915060600160405180910390a26040518481527fc9631ac46dbffe6d9b56e457c7c331dd4b9a2b277a0197a2072d2360cb1f95a59060200160405180910390a15050505050565b6109e0610ebe565b60008111610a305760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e203000000060448201526064016104e9565b6000610a3a6105c4565b9050600081610a4c84620f4240611268565b610a569190611233565b90506000610a6382610ee4565b90506000610a718284611255565b905080471015610abc5760405162461bcd60e51b8152602060048201526016602482015275496e73756666696369656e7420532062616c616e636560501b60448201526064016104e9565b600254604051632770a7eb60e21b8152336004820152602481018790526001600160a01b0390911690639dc29fac90604401600060405180830381600087803b158015610b0857600080fd5b505af1158015610b1c573d6000803e3d6000fd5b50506040516000925033915083908381818185875af1925050503d8060008114610b62576040519150601f19603f3d011682016040523d82523d6000602084013e610b67565b606091505b5050905080610bac5760405162461bcd60e51b815260206004820152601160248201527014c81d1c985b9cd9995c8819985a5b1959607a1b60448201526064016104e9565b6004546040516001600160a01b03909116908490600081818185875af1925050503d8060008114610bf9576040519150601f19603f3d011682016040523d82523d6000602084013e610bfe565b606091505b50508091505080610c475760405162461bcd60e51b8152602060048201526013602482015272119959481d1c985b9cd9995c8819985a5b1959606a1b60448201526064016104e9565b604080518781526020810186905290810184905233907f0767578fe51c4dd687a014ae3b7320d7197fc978c58d7eab147ed6f95e0297fb9060600160405180910390a26040518381527fc9631ac46dbffe6d9b56e457c7c331dd4b9a2b277a0197a2072d2360cb1f95a59060200160405180910390a1505050505050565b60008281526001602081905260409091200154610ce181610d3f565b6105638383610dc2565b600080516020611280833981519152610d0381610d3f565b60058290556040518281527fd6a2ef0720f8d4d91cec4a630ecb7f5bacc29f0c5cac66f2147ad542f7e5d29d9060200160405180910390a15050565b6105c18133610f01565b6000610d5583836107a0565b610dba5760008381526001602081815260408084206001600160a01b0387168086529252808420805460ff19169093179092559051339286917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a4506001610479565b506000610479565b6000610dce83836107a0565b15610dba5760008381526001602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a4506001610479565b610e37610f3e565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610e89610ebe565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610e643390565b60005460ff1615610ee25760405163d93c066560e01b815260040160405180910390fd5b565b600061271060055483610ef79190611268565b6104799190611233565b610f0b82826107a0565b610f3a5760405163e2517d3f60e01b81526001600160a01b0382166004820152602481018390526044016104e9565b5050565b60005460ff16610ee257604051638dfc202b60e01b815260040160405180910390fd5b600060208284031215610f7357600080fd5b81356001600160e01b031981168114610f8b57600080fd5b9392505050565b600060208284031215610fa457600080fd5b5035919050565b80356001600160a01b0381168114610fc257600080fd5b919050565b600060208284031215610fd957600080fd5b610f8b82610fab565b60008060408385031215610ff557600080fd5b8235915061100560208401610fab565b90509250929050565b805167ffffffffffffffff81168114610fc257600080fd5b8051600381900b8114610fc257600080fd5b60006080828403121561104a57600080fd5b6040516080810181811067ffffffffffffffff8211171561107b57634e487b7160e01b600052604160045260246000fd5b6040528251600781900b811461109057600080fd5b815261109e6020840161100e565b60208201526110af60408401611026565b6040820152606083015160608201528091505092915050565b634e487b7160e01b600052601160045260246000fd5b60008160070b677fffffffffffffff1981036110fc576110fc6110c8565b60000392915050565b60008160030b637fffffff1981036110fc576110fc6110c8565b63ffffffff82811682821603908082111561113c5761113c6110c8565b5092915050565b600181815b8085111561117e578160001904821115611164576111646110c8565b8085161561117157918102915b93841c9390800290611148565b509250929050565b60008261119557506001610479565b816111a257506000610479565b81600181146111b857600281146111c2576111de565b6001915050610479565b60ff8411156111d3576111d36110c8565b50506001821b610479565b5060208310610133831016604e8410600b8410161715611201575081810a610479565b61120b8383611143565b806000190482111561121f5761121f6110c8565b029392505050565b6000610f8b8383611186565b60008261125057634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610479576104796110c8565b8082028115828204841417610479576104796110c856fe3b5d4cc60d3ec3516ee8ae083bd60934f6eb2a6c54b1229985c41bfb092b2603a2646970667358221220865b4d05b06fbf86db819738f27302ae99463f3ed86d6e23d82747f27f0cbd8a64736f6c63430008140033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.