Source Code
Latest 25 from a total of 192 transactions
| Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Publish | 36463592 | 39 days ago | IN | 0 ETH | 0.00000026 | ||||
| Publish | 36455813 | 39 days ago | IN | 0 ETH | 0.00000017 | ||||
| Publish | 36409778 | 40 days ago | IN | 0 ETH | 0.00000017 | ||||
| Publish | 36330489 | 42 days ago | IN | 0 ETH | 0.00000011 | ||||
| Publish | 36330485 | 42 days ago | IN | 0 ETH | 0.00000011 | ||||
| Publish | 36330480 | 42 days ago | IN | 0 ETH | 0.00000011 | ||||
| Publish | 36207060 | 45 days ago | IN | 0 ETH | 0.00000008 | ||||
| Publish | 36157576 | 46 days ago | IN | 0 ETH | 0.00000019 | ||||
| Publish | 36155131 | 46 days ago | IN | 0 ETH | 0.00000013 | ||||
| Publish | 36155127 | 46 days ago | IN | 0 ETH | 0.00000013 | ||||
| Publish | 36029112 | 49 days ago | IN | 0 ETH | 0.00000036 | ||||
| Publish | 36029108 | 49 days ago | IN | 0 ETH | 0.00000036 | ||||
| Publish | 35960184 | 50 days ago | IN | 0 ETH | 0.00000016 | ||||
| Publish | 35899020 | 52 days ago | IN | 0 ETH | 0.00000017 | ||||
| Publish | 35862952 | 53 days ago | IN | 0 ETH | 0.00000033 | ||||
| Publish | 35812265 | 54 days ago | IN | 0 ETH | 0.00000022 | ||||
| Publish | 35771446 | 55 days ago | IN | 0 ETH | 0.00000012 | ||||
| Publish | 35771443 | 55 days ago | IN | 0 ETH | 0.00000012 | ||||
| Publish | 35771440 | 55 days ago | IN | 0 ETH | 0.00000012 | ||||
| Publish | 35642784 | 58 days ago | IN | 0 ETH | 0.00000011 | ||||
| Publish | 35598910 | 59 days ago | IN | 0 ETH | 0.00000011 | ||||
| Publish | 35555378 | 60 days ago | IN | 0 ETH | 0.00000012 | ||||
| Publish | 35552008 | 60 days ago | IN | 0 ETH | 0.00000009 | ||||
| Publish | 35481097 | 62 days ago | IN | 0 ETH | 0.0000001 | ||||
| Publish | 35425957 | 63 days ago | IN | 0 ETH | 0.00000015 |
Cross-Chain Transactions
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
NormalizedBTCFeerateIndex
Compiler Version
v0.8.27+commit.40a35a09
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.0;
import {ISilicaIndex} from "./interfaces/ISilicaIndex.sol";
import {ECDSA} from "@openzeppelin/utils/cryptography/ECDSA.sol";
import {AccessControl} from "@openzeppelin/access/AccessControl.sol";
/**
* @title Silica Base L2 Gas Index
* @author Alkimiya
* @notice Methods to provide gas index data for Base
*/
contract NormalizedBTCFeerateIndex is ISilicaIndex, AccessControl {
/*//////////////////////////////////////////////////////////////
STRUCTS
//////////////////////////////////////////////////////////////*/
struct Entry {
uint128 delta;
uint64 startBlock;
uint64 endBlock;
}
/*//////////////////////////////////////////////////////////////
ERRORS
//////////////////////////////////////////////////////////////*/
error NoDataForTick();
error Publish_InvalidCalldata(string message);
error EditTick_InvalidCalldata(string message);
/*//////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
event NewTick(
uint256 indexed tick,
uint256 balance,
uint256 oldBalance,
uint256 newBalance,
uint256 startBlock,
uint256 endBlock
);
event EditTick(
uint256 indexed tick,
uint256 balance,
uint256 oldBalance,
uint256 newBalance,
uint256 startBlock,
uint256 endBlock
);
/*//////////////////////////////////////////////////////////////
STATE VARIABLES
//////////////////////////////////////////////////////////////*/
uint256 private constant SHARES = 1e3;
uint256 private _balance = 0;
uint256 private _latestTick;
mapping(uint256 => Entry) public entries;
bytes32 private immutable _name;
bytes32 private immutable _symbol;
uint256 private immutable _decimals;
address private immutable _balanceToken;
bytes32 public constant PUBLISHER_ROLE = keccak256("PUBLISHER_ROLE");
/*//////////////////////////////////////////////////////////////
CONSTRUCTOR
//////////////////////////////////////////////////////////////*/
constructor(
string memory name_,
string memory symbol_,
uint256 decimals_,
address publisher_,
address balanceToken_,
uint256 initialBalance_,
uint256 initialTick_
) {
require(bytes(name_).length > 0, "Name cannot be empty");
require(bytes(symbol_).length > 0, "Symbol cannot be empty");
require(bytes(name_).length <= 32, "Name cannot exceed 32 bytes");
require(bytes(symbol_).length <= 32, "Symbol cannot exceed 32 bytes");
require(publisher_ != address(0), "Publisher cannot be zero address");
require(balanceToken_ != address(0), "Balance Token cannot be zero address");
_name = bytes32(bytes(name_));
_symbol = bytes32(bytes(symbol_));
_balance = initialBalance_;
_decimals = decimals_;
_balanceToken = balanceToken_;
_latestTick = initialTick_;
_grantRole(PUBLISHER_ROLE, publisher_);
_grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
}
/*//////////////////////////////////////////////////////////////
ROLE MANAGEMENT FUNCTIONS
//////////////////////////////////////////////////////////////*/
/**
* @dev Grants `role` to `account`.
* @notice The caller must have ``role``'s admin role.
* If `account` had not been already granted `role`, emits {RoleGranted} event.
*/
function grantRole(bytes32 role, address account) public override onlyRole(DEFAULT_ADMIN_ROLE) {
_grantRole(role, account);
}
/*//////////////////////////////////////////////////////////////
WRITE FUNCTIONS
//////////////////////////////////////////////////////////////*/
/**
* @notice Tracks the balance accumulated by the `shares()`.
* @param _delta The change in balance
*/
function publish(uint128 _delta, uint64 _startBlock, uint64 _endBlock) public onlyRole(PUBLISHER_ROLE) {
require(_delta > 0, Publish_InvalidCalldata("_delta must be positive"));
require(_startBlock <= _endBlock, Publish_InvalidCalldata("startBlock cannot be greater than endBlock"));
uint128 delta = uint128(_delta);
// State changes
uint256 oldBalance = _balance;
_balance += delta;
_latestTick += 1;
entries[_latestTick] = Entry({delta: delta, startBlock: (_startBlock), endBlock: (_endBlock)});
// Events
emit NewTick(_latestTick, _delta, oldBalance, _balance, _startBlock, _endBlock);
}
/**
* @notice Edit an existing entry
* @param _tick The day of the entry to edit
* @param _newDelta The new delta value
*/
function editTick(uint256 _tick, uint128 _newDelta, uint64 _newStartBlock, uint64 _newEndBlock)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
require(_tick <= _latestTick, EditTick_InvalidCalldata("Tick is greater than latest tick"));
require(_newDelta > 0, EditTick_InvalidCalldata("_delta must be positive"));
require(_newStartBlock <= _newEndBlock, EditTick_InvalidCalldata("startBlock cannot be greater than endBlock"));
Entry storage entry = entries[_tick];
uint128 oldDelta = entry.delta;
uint256 oldBalance = _balance;
uint128 newDelta = uint128(_newDelta);
entries[_tick] = Entry({delta: _newDelta, startBlock: _newStartBlock, endBlock: _newEndBlock});
_balance = oldBalance - oldDelta + newDelta;
emit EditTick(_tick, _newDelta, oldBalance, _balance, _newStartBlock, _newEndBlock);
}
/*//////////////////////////////////////////////////////////////
EXTERNAL VIEW FUNCTIONS
//////////////////////////////////////////////////////////////*/
function getLatestTick() external view returns (uint256) {
return _latestTick;
}
function getLatestTickData() external view returns (uint128, uint64, uint64) {
return getTickData(_latestTick);
}
function getTickData(uint256 _tick) public view returns (uint128, uint64, uint64) {
Entry memory entry = entries[_tick];
if (entry.delta == 0 && entry.startBlock == 0) {
revert NoDataForTick();
}
return (entry.delta, entry.startBlock, entry.endBlock);
}
function getTickDataInRange(uint256 from, uint256 to)
external
view
returns (uint128[] memory, uint64[] memory, uint64[] memory)
{
require(from <= to, "Invalid range");
require(to <= _latestTick, "Range exceeds latest tick");
uint128[] memory deltas = new uint128[](to - from + 1);
uint64[] memory startBlocks = new uint64[](to + 1 - from);
uint64[] memory endBlocks = new uint64[](to + 1 - from);
for (uint256 i = from; i <= to; i++) {
Entry memory entry = entries[i];
if (entry.delta == 0 && entry.startBlock == 0) {
revert NoDataForTick();
}
deltas[i - from] = entry.delta;
startBlocks[i - from] = entry.startBlock;
endBlocks[i - from] = entry.endBlock;
}
return (deltas, startBlocks, endBlocks);
}
/// @inheritdoc ISilicaIndex
function name() external view returns (string memory) {
return string(abi.encodePacked(_name));
}
/// @inheritdoc ISilicaIndex
function symbol() external view returns (string memory) {
return string(abi.encodePacked(_symbol));
}
/// @inheritdoc ISilicaIndex
function decimals() external view returns (uint256) {
return _decimals;
}
/// @inheritdoc ISilicaIndex
function shares() external pure returns (uint256) {
return SHARES;
}
/// @inheritdoc ISilicaIndex
function balanceToken() external view returns (address) {
return _balanceToken;
}
/// @inheritdoc ISilicaIndex
function balance() external view returns (uint256) {
return _balance;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* _ _ _ _ _
* / \ | | | _(_)_ __ ___ (_)_ _ __ _
* / _ \ | | |/ / | '_ ` _ \| | | | |/ _` |
* / ___ \| | <| | | | | | | | |_| | (_| |
* /_/_ \_\_|_|\_\_|_| |_| |_|_|\__, |\__,_|
* |_ _|_ __ __| | _____ __ |___/
* | || '_ \ / _` |/ _ \ \/ /
* | || | | | (_| | __/> <
* |___|_| |_|\__,_|\___/_/\_\
*/
/// @title Silica Index Protocol
/// @author Alkimiya
/// @notice Required methods for a contract to provide an index to Silica Pools
interface ISilicaIndex {
/// @return A name suitable for display as a page title or heading.
/// @custom:example "Bitcoin Mining Yield"
/// @custom:example "Lido Staked Ethereum Yield"
/// @custom:example "Gas Costs"
/// @custom:since 0.1.0
function name() external view returns (string memory);
/// @return Short name of the display units of `shares()`.
/// @custom:example "PH/s"
/// @custom:example "ystETH"
/// @custom:example "kgas"
/// @custom:since 0.1.0
function symbol() external view returns (string memory);
/// @return Decimal offset of `symbol()` vs indivisible units of `shares()`.
/// @custom:example If 1 `symbol()` (e.g. "PH/s") represents
/// 1e15 `shares()` (e.g. H/s)
/// then `decimals()` should return 15.
/// @custom:example If 1 `symbol()` (e.g. "ystETH") represents
/// 1e18 `shares()` (e.g. wei)
/// then `decimals()` should return 18.
/// @custom:example If 1 `symbol()` (e.g. "kgas") represents
/// 1e6 `shares()` (e.g. milligas per block)
/// then `decimals()` should return 6.
/// @custom:since 0.1.0
function decimals() external view returns (uint256);
/// @notice Size of the position tracked by this index.
/// Clients SHOULD NOT assume that this value is constant.
/// Clients SHOULD denominate pool shares in the same denomination
/// as `ISilicaIndex.shares()` (see: `symbol()`, `decimals()`).
/// @custom:example 1e15 H/s.
/// @custom:example `ILido.getPooledEthByShares(1 ether)` stETH wei.
/// @custom:example 1e3 milligas per block
/// @custom:since 0.1.0
function shares() external view returns (uint256);
/// @notice Clients MAY transact in any token which is pegged to
/// `balanceToken()`, as long as the `decimals()` match.
/// Clients SHOULD NOT transact in a token which is not pegged to
/// `balanceToken()`; the resulting financial contract will not
/// make sense.
/// @custom:example 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599 (WBTC on mainnet)
/// @custom:example 0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84 (stETH on mainnet)
/// @custom:example 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 (WETH on mainnet)
/// @custom:since 0.1.0
function balanceToken() external view returns (address);
/// @return Tracks the balance accumulated by the `shares()`.
/// @notice This is not required to increase over time.
/// Clients SHOULD have defensive programming against underflow
/// when taking `balance() - initialBalance`.
/// @custom:example WBTC earned per PH/s since Jan 1, 2023.
/// @custom:example `ILido.getPooledEthByShares(1 ether)` stETH.
/// @custom:example Running cost to transact 1 gas every block since Jan 1, 2023.
/// @custom:since 0.1.0
function balance() external view returns (uint256);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/ECDSA.sol)
pragma solidity ^0.8.20;
/**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/
library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS
}
/**
* @dev The signature derives the `address(0)`.
*/
error ECDSAInvalidSignature();
/**
* @dev The signature has an invalid length.
*/
error ECDSAInvalidSignatureLength(uint256 length);
/**
* @dev The signature has an S value that is in the upper half order.
*/
error ECDSAInvalidSignatureS(bytes32 s);
/**
* @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not
* return address(0) without also returning an error description. Errors are documented using an enum (error type)
* and a bytes32 providing additional information about the error.
*
* If no error is returned, then the address can be used for verification purposes.
*
* The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
*
* Documentation for signature generation:
* - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
* - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
*/
function tryRecover(
bytes32 hash,
bytes memory signature
) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {
if (signature.length == 65) {
bytes32 r;
bytes32 s;
uint8 v;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
assembly ("memory-safe") {
r := mload(add(signature, 0x20))
s := mload(add(signature, 0x40))
v := byte(0, mload(add(signature, 0x60)))
}
return tryRecover(hash, v, r, s);
} else {
return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
*/
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);
_throwError(error, errorArg);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
*
* See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures]
*/
function tryRecover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {
unchecked {
bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
// We do not check for an overflow here since the shift operation results in 0 or 1.
uint8 v = uint8((uint256(vs) >> 255) + 27);
return tryRecover(hash, v, r, s);
}
}
/**
* @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
*/
function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);
_throwError(error, errorArg);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function tryRecover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {
// EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
// unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
// the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
// signatures from current libraries generate a unique signature with an s-value in the lower half order.
//
// If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
// with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
// vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
// these malleable signatures as well.
if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
return (address(0), RecoverError.InvalidSignatureS, s);
}
// If the signature is valid (and not malleable), return the signer address
address signer = ecrecover(hash, v, r, s);
if (signer == address(0)) {
return (address(0), RecoverError.InvalidSignature, bytes32(0));
}
return (signer, RecoverError.NoError, bytes32(0));
}
/**
* @dev Overload of {ECDSA-recover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);
_throwError(error, errorArg);
return recovered;
}
/**
* @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.
*/
function _throwError(RecoverError error, bytes32 errorArg) private pure {
if (error == RecoverError.NoError) {
return; // no error: do nothing
} else if (error == RecoverError.InvalidSignature) {
revert ECDSAInvalidSignature();
} else if (error == RecoverError.InvalidSignatureLength) {
revert ECDSAInvalidSignatureLength(uint256(errorArg));
} else if (error == RecoverError.InvalidSignatureS) {
revert ECDSAInvalidSignatureS(errorArg);
}
}
}// 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);
}{
"remappings": [
"@openzeppelin/=lib/openzeppelin-contracts/contracts/",
"ds-test/=lib/forge-std/lib/ds-test/src/",
"forge-std/=lib/forge-std/src/",
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
"halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/",
"solady/=lib/solady/src/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "paris",
"viaIR": true,
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint256","name":"decimals_","type":"uint256"},{"internalType":"address","name":"publisher_","type":"address"},{"internalType":"address","name":"balanceToken_","type":"address"},{"internalType":"uint256","name":"initialBalance_","type":"uint256"},{"internalType":"uint256","name":"initialTick_","type":"uint256"}],"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":[{"internalType":"string","name":"message","type":"string"}],"name":"EditTick_InvalidCalldata","type":"error"},{"inputs":[],"name":"NoDataForTick","type":"error"},{"inputs":[{"internalType":"string","name":"message","type":"string"}],"name":"Publish_InvalidCalldata","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tick","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"balance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oldBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endBlock","type":"uint256"}],"name":"EditTick","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tick","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"balance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oldBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endBlock","type":"uint256"}],"name":"NewTick","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"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PUBLISHER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tick","type":"uint256"},{"internalType":"uint128","name":"_newDelta","type":"uint128"},{"internalType":"uint64","name":"_newStartBlock","type":"uint64"},{"internalType":"uint64","name":"_newEndBlock","type":"uint64"}],"name":"editTick","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"entries","outputs":[{"internalType":"uint128","name":"delta","type":"uint128"},{"internalType":"uint64","name":"startBlock","type":"uint64"},{"internalType":"uint64","name":"endBlock","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLatestTick","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLatestTickData","outputs":[{"internalType":"uint128","name":"","type":"uint128"},{"internalType":"uint64","name":"","type":"uint64"},{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tick","type":"uint256"}],"name":"getTickData","outputs":[{"internalType":"uint128","name":"","type":"uint128"},{"internalType":"uint64","name":"","type":"uint64"},{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"from","type":"uint256"},{"internalType":"uint256","name":"to","type":"uint256"}],"name":"getTickDataInRange","outputs":[{"internalType":"uint128[]","name":"","type":"uint128[]"},{"internalType":"uint64[]","name":"","type":"uint64[]"},{"internalType":"uint64[]","name":"","type":"uint64[]"}],"stateMutability":"view","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":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint128","name":"_delta","type":"uint128"},{"internalType":"uint64","name":"_startBlock","type":"uint64"},{"internalType":"uint64","name":"_endBlock","type":"uint64"}],"name":"publish","outputs":[],"stateMutability":"nonpayable","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":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]Contract Creation Code
610100604052346102e3576115108038038061001a816102e8565b92833981019060e0818303126102e35780516001600160401b0381116102e35782610046918301610323565b602082015190926001600160401b0382116102e357610066918301610323565b916040820151916100796060820161038e565b926100866080830161038e565b9160c060a08201519101519380511561029e578651156102595760208151116102145760208751116101cf576001600160a01b0386161561018b576001600160a01b0384161561013a576100fc966100e06100e8926103a2565b6080526103a2565b60a05260015560c05260e0526002556103c5565b5061010633610487565b50604051610fd290816104fe823960805181610849015260a05181610517015260c051816107b9015260e051816104950152f35b60405162461bcd60e51b8152602060048201526024808201527f42616c616e636520546f6b656e2063616e6e6f74206265207a65726f206164646044820152637265737360e01b6064820152608490fd5b606460405162461bcd60e51b815260206004820152602060248201527f5075626c69736865722063616e6e6f74206265207a65726f20616464726573736044820152fd5b60405162461bcd60e51b815260206004820152601d60248201527f53796d626f6c2063616e6e6f74206578636565642033322062797465730000006044820152606490fd5b60405162461bcd60e51b815260206004820152601b60248201527f4e616d652063616e6e6f742065786365656420333220627974657300000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601660248201527f53796d626f6c2063616e6e6f7420626520656d707479000000000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601460248201527f4e616d652063616e6e6f7420626520656d7074790000000000000000000000006044820152606490fd5b600080fd5b6040519190601f01601f191682016001600160401b0381118382101761030d57604052565b634e487b7160e01b600052604160045260246000fd5b81601f820112156102e3578051906001600160401b03821161030d57610352601f8301601f19166020016102e8565b92828452602083830101116102e35760005b82811061037957505060206000918301015290565b80602080928401015182828701015201610364565b51906001600160a01b03821682036102e357565b6020815191015190602081106103b6575090565b6000199060200360031b1b1690565b6001600160a01b03811660009081527f1d25d1bf9fe9bf50e1f6171a16c19ebe436b569b4a0755088949ca7700858eea602052604090205460ff16610481576001600160a01b031660008181527f1d25d1bf9fe9bf50e1f6171a16c19ebe436b569b4a0755088949ca7700858eea60205260408120805460ff191660011790553391907f0ac90c257048ef1c3e387c26d4a99bde06894efbcbff862dc1885c3a9319308a906000805160206114d08339815191529080a4600190565b50600090565b6001600160a01b03811660009081526000805160206114f0833981519152602052604090205460ff16610481576001600160a01b031660008181526000805160206114f083398151915260205260408120805460ff191660011790553391906000805160206114d08339815191528180a460019056fe608080604052600436101561001357600080fd5b60003560e01c90816301ffc9a714610b335750806303314efa14610b16578063046677ad1461089b57806305182dc31461087c57806306fdde0314610830578063248a9ca3146107fb5780632f2ff15d146107dc578063313ce567146107a15780633436fb42146105ce57806336568abe1461059657806391d148541461055657806395d89b41146104fe578063a08d0b3a146104e0578063a217fddf146104c4578063a30955af1461047f578063b30906d414610426578063b69ef8a814610408578063d34e6b8e14610208578063d547741f1461019a578063d8f4b6fd1461015f5763ff5cc8d21461010657600080fd5b3461015a57602036600319011261015a57610156610125600435610dac565b604080516001600160801b0390941684526001600160401b0392831660208501529116908201529081906060820190565b0390f35b600080fd5b3461015a57600036600319011261015a5760206040517f0ac90c257048ef1c3e387c26d4a99bde06894efbcbff862dc1885c3a9319308a8152f35b3461015a576101a836610c0c565b6101c082600052600060205260016040600020015490565b60008181526020818152604080832033845290915290205490929060ff16156101ef576101ed9250610f1a565b005b8263e2517d3f60e01b6000523360045260245260446000fd5b3461015a57606036600319011261015a576004356001600160801b0381169081810361015a57602435916001600160401b0383169182840361015a5761024c610c32565b3360009081527f1d25d1bf9fe9bf50e1f6171a16c19ebe436b569b4a0755088949ca7700858eea602052604090205460ff16156103cf57821561038f576001600160401b0381169081851161037157600154936102a98186610c55565b600155600254926001840180941161035b577f1ed7e37281933fe991833c0b873f6f3d13d62b48bbbb56f679a17c229924f23d968461035695600255604051936102f285610c62565b8452602084019182526040840192835260005260036020526001600160801b036040600020935116906001600160401b0360801b905160801b16916001600160401b0360c01b905160c01b1691171790556002549560015460405195869586610d72565b0390a2005b634e487b7160e01b600052601160045260246000fd5b60405163d4a7573360e01b81528061038b60048201610d27565b0390fd5b60405163d4a7573360e01b81526020600482015260176024820152765f64656c7461206d75737420626520706f73697469766560481b6044820152606490fd5b63e2517d3f60e01b600052336004527f0ac90c257048ef1c3e387c26d4a99bde06894efbcbff862dc1885c3a9319308a60245260446000fd5b3461015a57600036600319011261015a576020600154604051908152f35b3461015a57602036600319011261015a576004356000908152600360209081526040918290205482516001600160801b03821681526001600160401b03608083901c169281019290925260c01c91810191909152606090f35b3461015a57600036600319011261015a576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b3461015a57600036600319011261015a57602060405160008152f35b3461015a57600036600319011261015a576020600254604051908152f35b3461015a57600036600319011261015a576101566040517f000000000000000000000000000000000000000000000000000000000000000060208201526020815261054a604082610c93565b60405191829182610bc3565b3461015a5761056436610c0c565b90600052600060205260406000209060018060a01b0316600052602052602060ff604060002054166040519015158152f35b3461015a576105a436610c0c565b336001600160a01b038216036105bd576101ed91610f1a565b63334bd91960e11b60005260046000fd5b3461015a57608036600319011261015a576004356024356001600160801b03811680820361015a576105fe610c32565b91606435916001600160401b0383169283810361015a5761061d610e3c565b600254861161075c57811561071c576001600160401b03851694848611610702576106f2610356936106ed7f6151bfa864b669a584bd140d194b8e68ba940527a31bb53382488b0f53d1d480988a60005260036020526001600160801b036040600020541690600154996040519161069483610c62565b85835260208301908152604083019182528d60005260036020526001600160801b036040600020935116906001600160401b0360801b905160801b16916001600160401b0360c01b905160c01b16911717905588610c48565b610c55565b8060015560405195869586610d72565b6040516349f6537360e11b81528061038b60048201610d27565b6040516349f6537360e11b81526020600482015260176024820152765f64656c7461206d75737420626520706f73697469766560481b6044820152606490fd5b60646040516349f6537360e11b815260206004820152602060248201527f5469636b2069732067726561746572207468616e206c6174657374207469636b6044820152fd5b3461015a57600036600319011261015a5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b3461015a576101ed6107ed36610c0c565b906107f6610e3c565b610e8f565b3461015a57602036600319011261015a576020610828600435600052600060205260016040600020015490565b604051908152f35b3461015a57600036600319011261015a576101566040517f000000000000000000000000000000000000000000000000000000000000000060208201526020815261054a604082610c93565b3461015a57600036600319011261015a57610156610125600254610dac565b3461015a57604036600319011261015a57602435600435818111610ae1576002548211610a9c576108cc8183610c48565b916001830180931161035b576108fa6108e484610cb4565b936108f26040519586610c93565b808552610cb4565b602084019190601f1901368337600181019384821161035b579291906109286109238487610c48565b610ccb565b9061093861092385600098610c48565b93805b828111156109b057505050604051948594606086019060608752518091526080860193915b81811061098e575050508161098091856101569594036020870152610b86565b908382036040850152610b86565b82516001600160801b0316855287965060209485019490920191600101610960565b8088979495969752600360205260408820604051906109ce82610c62565b54906001600160801b038216908181526001600160401b038360801c166020820192818452604083019460c01c8552159081610a93575b50610a84576001600160401b0392916001600160801b0384925116610a33610a2d8888610c48565b8a610cfd565b525116610a49610a438686610c48565b89610cfd565b525116610a59610a438484610c48565b526000198114610a7057600101959493929561093b565b634e487b7160e01b88526011600452602488fd5b63b474ed2960e01b8b5260048bfd5b9050158c610a05565b60405162461bcd60e51b815260206004820152601960248201527f52616e67652065786365656473206c6174657374207469636b000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b6044820152606490fd5b3461015a57600036600319011261015a5760206040516103e88152f35b3461015a57602036600319011261015a576004359063ffffffff60e01b821680920361015a57602091637965db0b60e01b8114908115610b75575b5015158152f35b6301ffc9a760e01b14905083610b6e565b906020808351928381520192019060005b818110610ba45750505090565b82516001600160401b0316845260209384019390920191600101610b97565b91909160208152825180602083015260005b818110610bf6575060409293506000838284010152601f8019910116010190565b8060208092870101516040828601015201610bd5565b604090600319011261015a57600435906024356001600160a01b038116810361015a5790565b604435906001600160401b038216820361015a57565b9190820391821161035b57565b9190820180921161035b57565b606081019081106001600160401b03821117610c7d57604052565b634e487b7160e01b600052604160045260246000fd5b90601f801991011681019081106001600160401b03821117610c7d57604052565b6001600160401b038111610c7d5760051b60200190565b90610cd582610cb4565b610ce26040519182610c93565b8281528092610cf3601f1991610cb4565b0190602036910137565b8051821015610d115760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b60809060208152602a60208201527f7374617274426c6f636b2063616e6e6f742062652067726561746572207468616040820152696e20656e64426c6f636b60b01b60608201520190565b936001600160401b0392906080948492989793986001600160801b0360a089019a1688526020880152604087015216606085015216910152565b6000526003602052604060002060405190610dc682610c62565b54916001600160801b038316918281526001600160401b038460801c166020820193818552604083019560c01c8652159081610e33575b50610e22576001600160401b036001600160801b038192511693511693511691929190565b63b474ed2960e01b60005260046000fd5b90501538610dfd565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff1615610e7557565b63e2517d3f60e01b60005233600452600060245260446000fd5b6000818152602081815260408083206001600160a01b038616845290915290205460ff16610f13576000818152602081815260408083206001600160a01b0395909516808452949091528120805460ff19166001179055339291907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9080a4600190565b5050600090565b6000818152602081815260408083206001600160a01b038616845290915290205460ff1615610f13576000818152602081815260408083206001600160a01b0395909516808452949091528120805460ff19169055339291907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9080a460019056fea264697066735822122025ff9f3ebab6669eef180b3e2165807540a9a5d542a9215286d3760975944a0f64736f6c634300081b00332f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0dad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb500000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000300000000000000000000000077cbf7cfd19e8697683271b733eca60b7c6aecfd000000000000000000000000cbb7c0000ab88b473b1f5afd9ef808440eed33bf00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004ed200000000000000000000000000000000000000000000000000000000000000194e6f726d616c697a656442544346656572617465496e646578000000000000000000000000000000000000000000000000000000000000000000000000000005626c6f636b000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608080604052600436101561001357600080fd5b60003560e01c90816301ffc9a714610b335750806303314efa14610b16578063046677ad1461089b57806305182dc31461087c57806306fdde0314610830578063248a9ca3146107fb5780632f2ff15d146107dc578063313ce567146107a15780633436fb42146105ce57806336568abe1461059657806391d148541461055657806395d89b41146104fe578063a08d0b3a146104e0578063a217fddf146104c4578063a30955af1461047f578063b30906d414610426578063b69ef8a814610408578063d34e6b8e14610208578063d547741f1461019a578063d8f4b6fd1461015f5763ff5cc8d21461010657600080fd5b3461015a57602036600319011261015a57610156610125600435610dac565b604080516001600160801b0390941684526001600160401b0392831660208501529116908201529081906060820190565b0390f35b600080fd5b3461015a57600036600319011261015a5760206040517f0ac90c257048ef1c3e387c26d4a99bde06894efbcbff862dc1885c3a9319308a8152f35b3461015a576101a836610c0c565b6101c082600052600060205260016040600020015490565b60008181526020818152604080832033845290915290205490929060ff16156101ef576101ed9250610f1a565b005b8263e2517d3f60e01b6000523360045260245260446000fd5b3461015a57606036600319011261015a576004356001600160801b0381169081810361015a57602435916001600160401b0383169182840361015a5761024c610c32565b3360009081527f1d25d1bf9fe9bf50e1f6171a16c19ebe436b569b4a0755088949ca7700858eea602052604090205460ff16156103cf57821561038f576001600160401b0381169081851161037157600154936102a98186610c55565b600155600254926001840180941161035b577f1ed7e37281933fe991833c0b873f6f3d13d62b48bbbb56f679a17c229924f23d968461035695600255604051936102f285610c62565b8452602084019182526040840192835260005260036020526001600160801b036040600020935116906001600160401b0360801b905160801b16916001600160401b0360c01b905160c01b1691171790556002549560015460405195869586610d72565b0390a2005b634e487b7160e01b600052601160045260246000fd5b60405163d4a7573360e01b81528061038b60048201610d27565b0390fd5b60405163d4a7573360e01b81526020600482015260176024820152765f64656c7461206d75737420626520706f73697469766560481b6044820152606490fd5b63e2517d3f60e01b600052336004527f0ac90c257048ef1c3e387c26d4a99bde06894efbcbff862dc1885c3a9319308a60245260446000fd5b3461015a57600036600319011261015a576020600154604051908152f35b3461015a57602036600319011261015a576004356000908152600360209081526040918290205482516001600160801b03821681526001600160401b03608083901c169281019290925260c01c91810191909152606090f35b3461015a57600036600319011261015a576040517f000000000000000000000000cbb7c0000ab88b473b1f5afd9ef808440eed33bf6001600160a01b03168152602090f35b3461015a57600036600319011261015a57602060405160008152f35b3461015a57600036600319011261015a576020600254604051908152f35b3461015a57600036600319011261015a576101566040517f626c6f636b00000000000000000000000000000000000000000000000000000060208201526020815261054a604082610c93565b60405191829182610bc3565b3461015a5761056436610c0c565b90600052600060205260406000209060018060a01b0316600052602052602060ff604060002054166040519015158152f35b3461015a576105a436610c0c565b336001600160a01b038216036105bd576101ed91610f1a565b63334bd91960e11b60005260046000fd5b3461015a57608036600319011261015a576004356024356001600160801b03811680820361015a576105fe610c32565b91606435916001600160401b0383169283810361015a5761061d610e3c565b600254861161075c57811561071c576001600160401b03851694848611610702576106f2610356936106ed7f6151bfa864b669a584bd140d194b8e68ba940527a31bb53382488b0f53d1d480988a60005260036020526001600160801b036040600020541690600154996040519161069483610c62565b85835260208301908152604083019182528d60005260036020526001600160801b036040600020935116906001600160401b0360801b905160801b16916001600160401b0360c01b905160c01b16911717905588610c48565b610c55565b8060015560405195869586610d72565b6040516349f6537360e11b81528061038b60048201610d27565b6040516349f6537360e11b81526020600482015260176024820152765f64656c7461206d75737420626520706f73697469766560481b6044820152606490fd5b60646040516349f6537360e11b815260206004820152602060248201527f5469636b2069732067726561746572207468616e206c6174657374207469636b6044820152fd5b3461015a57600036600319011261015a5760206040517f00000000000000000000000000000000000000000000000000000000000000038152f35b3461015a576101ed6107ed36610c0c565b906107f6610e3c565b610e8f565b3461015a57602036600319011261015a576020610828600435600052600060205260016040600020015490565b604051908152f35b3461015a57600036600319011261015a576101566040517f4e6f726d616c697a656442544346656572617465496e6465780000000000000060208201526020815261054a604082610c93565b3461015a57600036600319011261015a57610156610125600254610dac565b3461015a57604036600319011261015a57602435600435818111610ae1576002548211610a9c576108cc8183610c48565b916001830180931161035b576108fa6108e484610cb4565b936108f26040519586610c93565b808552610cb4565b602084019190601f1901368337600181019384821161035b579291906109286109238487610c48565b610ccb565b9061093861092385600098610c48565b93805b828111156109b057505050604051948594606086019060608752518091526080860193915b81811061098e575050508161098091856101569594036020870152610b86565b908382036040850152610b86565b82516001600160801b0316855287965060209485019490920191600101610960565b8088979495969752600360205260408820604051906109ce82610c62565b54906001600160801b038216908181526001600160401b038360801c166020820192818452604083019460c01c8552159081610a93575b50610a84576001600160401b0392916001600160801b0384925116610a33610a2d8888610c48565b8a610cfd565b525116610a49610a438686610c48565b89610cfd565b525116610a59610a438484610c48565b526000198114610a7057600101959493929561093b565b634e487b7160e01b88526011600452602488fd5b63b474ed2960e01b8b5260048bfd5b9050158c610a05565b60405162461bcd60e51b815260206004820152601960248201527f52616e67652065786365656473206c6174657374207469636b000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b6044820152606490fd5b3461015a57600036600319011261015a5760206040516103e88152f35b3461015a57602036600319011261015a576004359063ffffffff60e01b821680920361015a57602091637965db0b60e01b8114908115610b75575b5015158152f35b6301ffc9a760e01b14905083610b6e565b906020808351928381520192019060005b818110610ba45750505090565b82516001600160401b0316845260209384019390920191600101610b97565b91909160208152825180602083015260005b818110610bf6575060409293506000838284010152601f8019910116010190565b8060208092870101516040828601015201610bd5565b604090600319011261015a57600435906024356001600160a01b038116810361015a5790565b604435906001600160401b038216820361015a57565b9190820391821161035b57565b9190820180921161035b57565b606081019081106001600160401b03821117610c7d57604052565b634e487b7160e01b600052604160045260246000fd5b90601f801991011681019081106001600160401b03821117610c7d57604052565b6001600160401b038111610c7d5760051b60200190565b90610cd582610cb4565b610ce26040519182610c93565b8281528092610cf3601f1991610cb4565b0190602036910137565b8051821015610d115760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b60809060208152602a60208201527f7374617274426c6f636b2063616e6e6f742062652067726561746572207468616040820152696e20656e64426c6f636b60b01b60608201520190565b936001600160401b0392906080948492989793986001600160801b0360a089019a1688526020880152604087015216606085015216910152565b6000526003602052604060002060405190610dc682610c62565b54916001600160801b038316918281526001600160401b038460801c166020820193818552604083019560c01c8652159081610e33575b50610e22576001600160401b036001600160801b038192511693511693511691929190565b63b474ed2960e01b60005260046000fd5b90501538610dfd565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff1615610e7557565b63e2517d3f60e01b60005233600452600060245260446000fd5b6000818152602081815260408083206001600160a01b038616845290915290205460ff16610f13576000818152602081815260408083206001600160a01b0395909516808452949091528120805460ff19166001179055339291907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9080a4600190565b5050600090565b6000818152602081815260408083206001600160a01b038616845290915290205460ff1615610f13576000818152602081815260408083206001600160a01b0395909516808452949091528120805460ff19169055339291907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9080a460019056fea264697066735822122025ff9f3ebab6669eef180b3e2165807540a9a5d542a9215286d3760975944a0f64736f6c634300081b0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000300000000000000000000000077cbf7cfd19e8697683271b733eca60b7c6aecfd000000000000000000000000cbb7c0000ab88b473b1f5afd9ef808440eed33bf00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004ed200000000000000000000000000000000000000000000000000000000000000194e6f726d616c697a656442544346656572617465496e646578000000000000000000000000000000000000000000000000000000000000000000000000000005626c6f636b000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name_ (string): NormalizedBTCFeerateIndex
Arg [1] : symbol_ (string): block
Arg [2] : decimals_ (uint256): 3
Arg [3] : publisher_ (address): 0x77CbF7CFD19e8697683271b733eCA60b7C6aeCFD
Arg [4] : balanceToken_ (address): 0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf
Arg [5] : initialBalance_ (uint256): 0
Arg [6] : initialTick_ (uint256): 20178
-----Encoded View---------------
11 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [3] : 00000000000000000000000077cbf7cfd19e8697683271b733eca60b7c6aecfd
Arg [4] : 000000000000000000000000cbb7c0000ab88b473b1f5afd9ef808440eed33bf
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000004ed2
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000019
Arg [8] : 4e6f726d616c697a656442544346656572617465496e64657800000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [10] : 626c6f636b000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
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.