Source Code
Latest 25 from a total of 6,059 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Claim | 18443517 | 144 days ago | IN | 0 ETH | 0.00000588 | ||||
| Claim | 18436776 | 144 days ago | IN | 0 ETH | 0.00000677 | ||||
| Claim | 18435242 | 144 days ago | IN | 0 ETH | 0.00000706 | ||||
| Claim | 18431560 | 144 days ago | IN | 0 ETH | 0.00000561 | ||||
| Claim | 18430114 | 144 days ago | IN | 0 ETH | 0.00000547 | ||||
| Claim | 18411972 | 144 days ago | IN | 0 ETH | 0.00000648 | ||||
| Claim | 18409262 | 144 days ago | IN | 0 ETH | 0.00000558 | ||||
| Claim | 18408625 | 144 days ago | IN | 0 ETH | 0.00000558 | ||||
| Claim | 18403482 | 144 days ago | IN | 0 ETH | 0.00000628 | ||||
| Claim | 18399427 | 144 days ago | IN | 0 ETH | 0.00000567 | ||||
| Claim | 18384910 | 145 days ago | IN | 0 ETH | 0.00000704 | ||||
| Claim | 18383201 | 145 days ago | IN | 0 ETH | 0.00000562 | ||||
| Claim | 18379333 | 145 days ago | IN | 0 ETH | 0.00000707 | ||||
| Claim | 18377500 | 145 days ago | IN | 0 ETH | 0.00000641 | ||||
| Claim | 18377377 | 145 days ago | IN | 0 ETH | 0.0000071 | ||||
| Claim | 18375584 | 145 days ago | IN | 0 ETH | 0.00000712 | ||||
| Claim | 18374302 | 145 days ago | IN | 0 ETH | 0.00000566 | ||||
| Claim | 18372298 | 145 days ago | IN | 0 ETH | 0.0000071 | ||||
| Claim | 18359607 | 145 days ago | IN | 0 ETH | 0.00000647 | ||||
| Claim | 18358810 | 145 days ago | IN | 0 ETH | 0.00000603 | ||||
| Claim | 18350309 | 145 days ago | IN | 0 ETH | 0.00000797 | ||||
| Claim | 18344553 | 145 days ago | IN | 0 ETH | 0.00000906 | ||||
| Claim | 18316216 | 145 days ago | IN | 0 ETH | 0.00000567 | ||||
| Claim | 18299372 | 146 days ago | IN | 0 ETH | 0.00000558 | ||||
| Claim | 18294802 | 146 days ago | IN | 0 ETH | 0.00000583 |
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 17373222 | 157 days ago | 0.03287514 ETH | ||||
| 14302936 | 194 days ago | 0.00328751 ETH | ||||
| 10172576 | 243 days ago | 0.24656358 ETH | ||||
| 9284999 | 254 days ago | 0.00032875 ETH | ||||
| 9175660 | 255 days ago | 0.09862543 ETH | ||||
| 9158309 | 255 days ago | 0.00986254 ETH | ||||
| 9114903 | 256 days ago | 0.00657502 ETH | ||||
| 8504004 | 263 days ago | 0.0019725 ETH | ||||
| 8442550 | 264 days ago | 0.15385567 ETH | ||||
| 8437303 | 264 days ago | 0.00460252 ETH | ||||
| 8339131 | 265 days ago | 0.01873883 ETH | ||||
| 8328283 | 265 days ago | 0.0006575 ETH | ||||
| 8280169 | 266 days ago | 0.82187859 ETH | ||||
| 8280127 | 266 days ago | 0.82187859 ETH | ||||
| 8280113 | 266 days ago | 0.77256588 ETH | ||||
| 8280038 | 266 days ago | 0.82187859 ETH | ||||
| 8140936 | 268 days ago | 0.00591752 ETH | ||||
| 8138927 | 268 days ago | 0.00821878 ETH | ||||
| 8058510 | 269 days ago | 0.03287514 ETH | ||||
| 8034966 | 269 days ago | 0.00394501 ETH | ||||
| 7957482 | 270 days ago | 0.00493127 ETH | ||||
| 7953045 | 270 days ago | 0.12755555 ETH | ||||
| 7917802 | 270 days ago | 0.01315005 ETH | ||||
| 7917578 | 270 days ago | 0.00953379 ETH | ||||
| 7917457 | 270 days ago | 0.00394501 ETH |
Cross-Chain Transactions
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
Tranche
Compiler Version
v0.8.26+commit.8a97fa7a
ZkSolc Version
v1.5.11
Optimization Enabled:
Yes with Mode 3
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.19;
import "@openzeppelin/token/ERC20/IERC20.sol";
import "@openzeppelin/access/Ownable.sol";
import {FixedPointMathLib} from "solady/utils/FixedPointMathLib.sol";
contract Tranche is Ownable {
error InvalidDate();
error MaturityDateReached();
error MaxCapReached();
error InvalidCap();
error MaturityDateNotReached();
error WithdrawFailed();
error AlreadyClaimed();
error InvalidAddress();
error InvalidMaxCap();
error TooSoon();
error WalletCapReached();
event NewDeposit(address indexed depositor, uint256 depositAmt, uint256 totalDeposits);
event NewMaxCapSet(uint256 maxCap);
address public immutable bigcoin;
// when rewards are released
uint256 public immutable maturityDate;
// total rewards to be paid out in ETH
uint256 public rewards;
// total amount of deposits allowed
uint256 public maxCap;
// current amount of total deposits
uint256 public totalDeposits;
// deposits per user
mapping(address => uint256) public userDeposits;
// tracks claims when maturity date is reached
mapping(address => bool) public userClaimed;
// track how many rewards a user claimed at maturity date
mapping(address => uint256) public userClaimedEthAmt;
uint256 public walletCap;
constructor(uint256 _maturityDate, uint256 _maxCap, address _bigcoin) Ownable(msg.sender) {
if (_maturityDate < block.timestamp) revert InvalidDate();
if (_bigcoin == address(0)) revert InvalidAddress();
if (_maxCap == 0) revert InvalidMaxCap();
maturityDate = _maturityDate;
maxCap = _maxCap;
bigcoin = _bigcoin;
walletCap = 2500e18;
}
// deposit into this tranche
function deposit(uint256 amt) external returns (uint256) {
if (totalDeposits == maxCap) revert MaxCapReached();
if (block.timestamp > maturityDate) revert MaturityDateReached();
if (userDeposits[msg.sender] + amt > walletCap) {
revert WalletCapReached();
}
// only deposit up to max cap
uint256 depositAmt = amt;
if (totalDeposits + depositAmt > maxCap) {
depositAmt = maxCap - totalDeposits;
}
userDeposits[msg.sender] += depositAmt;
totalDeposits += depositAmt;
IERC20(bigcoin).transferFrom(msg.sender, address(this), depositAmt);
emit NewDeposit(msg.sender, depositAmt, totalDeposits);
return depositAmt;
}
// when maturity date is reached, allow claiming of rewards
function claim() external returns (uint256, uint256) {
if (block.timestamp <= maturityDate) revert MaturityDateNotReached();
if (userClaimed[msg.sender]) revert AlreadyClaimed();
// prevent double claim
userClaimed[msg.sender] = true;
uint256 userDeposit = userDeposits[msg.sender];
// (userDeposit / totalDeposits) in fixed point (WAD = 1e18)
uint256 share = FixedPointMathLib.divWad(userDeposit, totalDeposits);
uint256 reward = FixedPointMathLib.mulWad(share, rewards);
userClaimedEthAmt[msg.sender] = reward;
(bool success,) = payable(msg.sender).call{value: reward}("");
if (!success) revert WithdrawFailed();
IERC20(bigcoin).transfer(msg.sender, userDeposit);
return (reward, userDeposit);
}
function setMaxCap(uint256 _maxCap) external onlyOwner {
// tranche already matured
if (block.timestamp > maturityDate) revert MaturityDateReached();
// cant set less than deposited amount in contract
if (_maxCap < totalDeposits) revert InvalidCap();
maxCap = _maxCap;
emit NewMaxCapSet(maxCap);
}
// can claim any unclaimed rewards after 15 days
function claimUnclaimed() external onlyOwner {
if (block.timestamp < maturityDate + 15 days) revert TooSoon();
(bool success,) = payable(msg.sender).call{value: address(this).balance}("");
if (!success) revert WithdrawFailed();
IERC20(bigcoin).transfer(msg.sender, IERC20(bigcoin).balanceOf(address(this)));
}
function setWalletCap(uint256 cap) external onlyOwner {
walletCap = cap;
}
function claimedAmt(address depositor) external view returns (uint256, uint256) {
return (userClaimedEthAmt[depositor], userDeposits[depositor]);
}
function viewRewards(address depositor) external view returns (uint256) {
uint256 userDeposit = userDeposits[depositor];
// (userDeposit / totalDeposits) in fixed point (WAD = 1e18)
uint256 share = FixedPointMathLib.divWad(userDeposit, totalDeposits);
uint256 reward = FixedPointMathLib.mulWad(share, rewards);
return reward;
}
receive() external payable {
if (block.timestamp > maturityDate) revert MaturityDateReached();
rewards += msg.value;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC-20 standard as defined in the ERC.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 value) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 value) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is set to the address provided by the deployer. This can
* later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
/// @notice Arithmetic library with operations for fixed-point numbers.
/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/FixedPointMathLib.sol)
/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/FixedPointMathLib.sol)
library FixedPointMathLib {
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* CUSTOM ERRORS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev The operation failed, as the output exceeds the maximum value of uint256.
error ExpOverflow();
/// @dev The operation failed, as the output exceeds the maximum value of uint256.
error FactorialOverflow();
/// @dev The operation failed, due to an overflow.
error RPowOverflow();
/// @dev The mantissa is too big to fit.
error MantissaOverflow();
/// @dev The operation failed, due to an multiplication overflow.
error MulWadFailed();
/// @dev The operation failed, due to an multiplication overflow.
error SMulWadFailed();
/// @dev The operation failed, either due to a multiplication overflow, or a division by a zero.
error DivWadFailed();
/// @dev The operation failed, either due to a multiplication overflow, or a division by a zero.
error SDivWadFailed();
/// @dev The operation failed, either due to a multiplication overflow, or a division by a zero.
error MulDivFailed();
/// @dev The division failed, as the denominator is zero.
error DivFailed();
/// @dev The full precision multiply-divide operation failed, either due
/// to the result being larger than 256 bits, or a division by a zero.
error FullMulDivFailed();
/// @dev The output is undefined, as the input is less-than-or-equal to zero.
error LnWadUndefined();
/// @dev The input outside the acceptable domain.
error OutOfDomain();
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* CONSTANTS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev The scalar of ETH and most ERC20s.
uint256 internal constant WAD = 1e18;
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* SIMPLIFIED FIXED POINT OPERATIONS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev Equivalent to `(x * y) / WAD` rounded down.
function mulWad(uint256 x, uint256 y) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
// Equivalent to `require(y == 0 || x <= type(uint256).max / y)`.
if gt(x, div(not(0), y)) {
if y {
mstore(0x00, 0xbac65e5b) // `MulWadFailed()`.
revert(0x1c, 0x04)
}
}
z := div(mul(x, y), WAD)
}
}
/// @dev Equivalent to `(x * y) / WAD` rounded down.
function sMulWad(int256 x, int256 y) internal pure returns (int256 z) {
/// @solidity memory-safe-assembly
assembly {
z := mul(x, y)
// Equivalent to `require((x == 0 || z / x == y) && !(x == -1 && y == type(int256).min))`.
if iszero(gt(or(iszero(x), eq(sdiv(z, x), y)), lt(not(x), eq(y, shl(255, 1))))) {
mstore(0x00, 0xedcd4dd4) // `SMulWadFailed()`.
revert(0x1c, 0x04)
}
z := sdiv(z, WAD)
}
}
/// @dev Equivalent to `(x * y) / WAD` rounded down, but without overflow checks.
function rawMulWad(uint256 x, uint256 y) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
z := div(mul(x, y), WAD)
}
}
/// @dev Equivalent to `(x * y) / WAD` rounded down, but without overflow checks.
function rawSMulWad(int256 x, int256 y) internal pure returns (int256 z) {
/// @solidity memory-safe-assembly
assembly {
z := sdiv(mul(x, y), WAD)
}
}
/// @dev Equivalent to `(x * y) / WAD` rounded up.
function mulWadUp(uint256 x, uint256 y) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
z := mul(x, y)
// Equivalent to `require(y == 0 || x <= type(uint256).max / y)`.
if iszero(eq(div(z, y), x)) {
if y {
mstore(0x00, 0xbac65e5b) // `MulWadFailed()`.
revert(0x1c, 0x04)
}
}
z := add(iszero(iszero(mod(z, WAD))), div(z, WAD))
}
}
/// @dev Equivalent to `(x * y) / WAD` rounded up, but without overflow checks.
function rawMulWadUp(uint256 x, uint256 y) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
z := add(iszero(iszero(mod(mul(x, y), WAD))), div(mul(x, y), WAD))
}
}
/// @dev Equivalent to `(x * WAD) / y` rounded down.
function divWad(uint256 x, uint256 y) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
// Equivalent to `require(y != 0 && x <= type(uint256).max / WAD)`.
if iszero(mul(y, lt(x, add(1, div(not(0), WAD))))) {
mstore(0x00, 0x7c5f487d) // `DivWadFailed()`.
revert(0x1c, 0x04)
}
z := div(mul(x, WAD), y)
}
}
/// @dev Equivalent to `(x * WAD) / y` rounded down.
function sDivWad(int256 x, int256 y) internal pure returns (int256 z) {
/// @solidity memory-safe-assembly
assembly {
z := mul(x, WAD)
// Equivalent to `require(y != 0 && ((x * WAD) / WAD == x))`.
if iszero(mul(y, eq(sdiv(z, WAD), x))) {
mstore(0x00, 0x5c43740d) // `SDivWadFailed()`.
revert(0x1c, 0x04)
}
z := sdiv(z, y)
}
}
/// @dev Equivalent to `(x * WAD) / y` rounded down, but without overflow and divide by zero checks.
function rawDivWad(uint256 x, uint256 y) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
z := div(mul(x, WAD), y)
}
}
/// @dev Equivalent to `(x * WAD) / y` rounded down, but without overflow and divide by zero checks.
function rawSDivWad(int256 x, int256 y) internal pure returns (int256 z) {
/// @solidity memory-safe-assembly
assembly {
z := sdiv(mul(x, WAD), y)
}
}
/// @dev Equivalent to `(x * WAD) / y` rounded up.
function divWadUp(uint256 x, uint256 y) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
// Equivalent to `require(y != 0 && x <= type(uint256).max / WAD)`.
if iszero(mul(y, lt(x, add(1, div(not(0), WAD))))) {
mstore(0x00, 0x7c5f487d) // `DivWadFailed()`.
revert(0x1c, 0x04)
}
z := add(iszero(iszero(mod(mul(x, WAD), y))), div(mul(x, WAD), y))
}
}
/// @dev Equivalent to `(x * WAD) / y` rounded up, but without overflow and divide by zero checks.
function rawDivWadUp(uint256 x, uint256 y) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
z := add(iszero(iszero(mod(mul(x, WAD), y))), div(mul(x, WAD), y))
}
}
/// @dev Equivalent to `x` to the power of `y`.
/// because `x ** y = (e ** ln(x)) ** y = e ** (ln(x) * y)`.
/// Note: This function is an approximation.
function powWad(int256 x, int256 y) internal pure returns (int256) {
// Using `ln(x)` means `x` must be greater than 0.
return expWad((lnWad(x) * y) / int256(WAD));
}
/// @dev Returns `exp(x)`, denominated in `WAD`.
/// Credit to Remco Bloemen under MIT license: https://2π.com/22/exp-ln
/// Note: This function is an approximation. Monotonically increasing.
function expWad(int256 x) internal pure returns (int256 r) {
unchecked {
// When the result is less than 0.5 we return zero.
// This happens when `x <= (log(1e-18) * 1e18) ~ -4.15e19`.
if (x <= -41446531673892822313) return r;
/// @solidity memory-safe-assembly
assembly {
// When the result is greater than `(2**255 - 1) / 1e18` we can not represent it as
// an int. This happens when `x >= floor(log((2**255 - 1) / 1e18) * 1e18) ≈ 135`.
if iszero(slt(x, 135305999368893231589)) {
mstore(0x00, 0xa37bfec9) // `ExpOverflow()`.
revert(0x1c, 0x04)
}
}
// `x` is now in the range `(-42, 136) * 1e18`. Convert to `(-42, 136) * 2**96`
// for more intermediate precision and a binary basis. This base conversion
// is a multiplication by 1e18 / 2**96 = 5**18 / 2**78.
x = (x << 78) / 5 ** 18;
// Reduce range of x to (-½ ln 2, ½ ln 2) * 2**96 by factoring out powers
// of two such that exp(x) = exp(x') * 2**k, where k is an integer.
// Solving this gives k = round(x / log(2)) and x' = x - k * log(2).
int256 k = ((x << 96) / 54916777467707473351141471128 + 2 ** 95) >> 96;
x = x - k * 54916777467707473351141471128;
// `k` is in the range `[-61, 195]`.
// Evaluate using a (6, 7)-term rational approximation.
// `p` is made monic, we'll multiply by a scale factor later.
int256 y = x + 1346386616545796478920950773328;
y = ((y * x) >> 96) + 57155421227552351082224309758442;
int256 p = y + x - 94201549194550492254356042504812;
p = ((p * y) >> 96) + 28719021644029726153956944680412240;
p = p * x + (4385272521454847904659076985693276 << 96);
// We leave `p` in `2**192` basis so we don't need to scale it back up for the division.
int256 q = x - 2855989394907223263936484059900;
q = ((q * x) >> 96) + 50020603652535783019961831881945;
q = ((q * x) >> 96) - 533845033583426703283633433725380;
q = ((q * x) >> 96) + 3604857256930695427073651918091429;
q = ((q * x) >> 96) - 14423608567350463180887372962807573;
q = ((q * x) >> 96) + 26449188498355588339934803723976023;
/// @solidity memory-safe-assembly
assembly {
// Div in assembly because solidity adds a zero check despite the unchecked.
// The q polynomial won't have zeros in the domain as all its roots are complex.
// No scaling is necessary because p is already `2**96` too large.
r := sdiv(p, q)
}
// r should be in the range `(0.09, 0.25) * 2**96`.
// We now need to multiply r by:
// - The scale factor `s ≈ 6.031367120`.
// - The `2**k` factor from the range reduction.
// - The `1e18 / 2**96` factor for base conversion.
// We do this all at once, with an intermediate result in `2**213`
// basis, so the final right shift is always by a positive amount.
r = int256(
(uint256(r) * 3822833074963236453042738258902158003155416615667) >> uint256(195 - k)
);
}
}
/// @dev Returns `ln(x)`, denominated in `WAD`.
/// Credit to Remco Bloemen under MIT license: https://2π.com/22/exp-ln
/// Note: This function is an approximation. Monotonically increasing.
function lnWad(int256 x) internal pure returns (int256 r) {
/// @solidity memory-safe-assembly
assembly {
// We want to convert `x` from `10**18` fixed point to `2**96` fixed point.
// We do this by multiplying by `2**96 / 10**18`. But since
// `ln(x * C) = ln(x) + ln(C)`, we can simply do nothing here
// and add `ln(2**96 / 10**18)` at the end.
// Compute `k = log2(x) - 96`, `r = 159 - k = 255 - log2(x) = 255 ^ log2(x)`.
r := shl(7, lt(0xffffffffffffffffffffffffffffffff, x))
r := or(r, shl(6, lt(0xffffffffffffffff, shr(r, x))))
r := or(r, shl(5, lt(0xffffffff, shr(r, x))))
r := or(r, shl(4, lt(0xffff, shr(r, x))))
r := or(r, shl(3, lt(0xff, shr(r, x))))
// We place the check here for more optimal stack operations.
if iszero(sgt(x, 0)) {
mstore(0x00, 0x1615e638) // `LnWadUndefined()`.
revert(0x1c, 0x04)
}
// forgefmt: disable-next-item
r := xor(r, byte(and(0x1f, shr(shr(r, x), 0x8421084210842108cc6318c6db6d54be)),
0xf8f9f9faf9fdfafbf9fdfcfdfafbfcfef9fafdfafcfcfbfefafafcfbffffffff))
// Reduce range of x to (1, 2) * 2**96
// ln(2^k * x) = k * ln(2) + ln(x)
x := shr(159, shl(r, x))
// Evaluate using a (8, 8)-term rational approximation.
// `p` is made monic, we will multiply by a scale factor later.
// forgefmt: disable-next-item
let p := sub( // This heavily nested expression is to avoid stack-too-deep for via-ir.
sar(96, mul(add(43456485725739037958740375743393,
sar(96, mul(add(24828157081833163892658089445524,
sar(96, mul(add(3273285459638523848632254066296,
x), x))), x))), x)), 11111509109440967052023855526967)
p := sub(sar(96, mul(p, x)), 45023709667254063763336534515857)
p := sub(sar(96, mul(p, x)), 14706773417378608786704636184526)
p := sub(mul(p, x), shl(96, 795164235651350426258249787498))
// We leave `p` in `2**192` basis so we don't need to scale it back up for the division.
// `q` is monic by convention.
let q := add(5573035233440673466300451813936, x)
q := add(71694874799317883764090561454958, sar(96, mul(x, q)))
q := add(283447036172924575727196451306956, sar(96, mul(x, q)))
q := add(401686690394027663651624208769553, sar(96, mul(x, q)))
q := add(204048457590392012362485061816622, sar(96, mul(x, q)))
q := add(31853899698501571402653359427138, sar(96, mul(x, q)))
q := add(909429971244387300277376558375, sar(96, mul(x, q)))
// `p / q` is in the range `(0, 0.125) * 2**96`.
// Finalization, we need to:
// - Multiply by the scale factor `s = 5.549…`.
// - Add `ln(2**96 / 10**18)`.
// - Add `k * ln(2)`.
// - Multiply by `10**18 / 2**96 = 5**18 >> 78`.
// The q polynomial is known not to have zeros in the domain.
// No scaling required because p is already `2**96` too large.
p := sdiv(p, q)
// Multiply by the scaling factor: `s * 5**18 * 2**96`, base is now `5**18 * 2**192`.
p := mul(1677202110996718588342820967067443963516166, p)
// Add `ln(2) * k * 5**18 * 2**192`.
// forgefmt: disable-next-item
p := add(mul(16597577552685614221487285958193947469193820559219878177908093499208371, sub(159, r)), p)
// Add `ln(2**96 / 10**18) * 5**18 * 2**192`.
p := add(600920179829731861736702779321621459595472258049074101567377883020018308, p)
// Base conversion: mul `2**18 / 2**192`.
r := sar(174, p)
}
}
/// @dev Returns `W_0(x)`, denominated in `WAD`.
/// See: https://en.wikipedia.org/wiki/Lambert_W_function
/// a.k.a. Product log function. This is an approximation of the principal branch.
/// Note: This function is an approximation. Monotonically increasing.
function lambertW0Wad(int256 x) internal pure returns (int256 w) {
// forgefmt: disable-next-item
unchecked {
if ((w = x) <= -367879441171442322) revert OutOfDomain(); // `x` less than `-1/e`.
(int256 wad, int256 p) = (int256(WAD), x);
uint256 c; // Whether we need to avoid catastrophic cancellation.
uint256 i = 4; // Number of iterations.
if (w <= 0x1ffffffffffff) {
if (-0x4000000000000 <= w) {
i = 1; // Inputs near zero only take one step to converge.
} else if (w <= -0x3ffffffffffffff) {
i = 32; // Inputs near `-1/e` take very long to converge.
}
} else if (uint256(w >> 63) == uint256(0)) {
/// @solidity memory-safe-assembly
assembly {
// Inline log2 for more performance, since the range is small.
let v := shr(49, w)
let l := shl(3, lt(0xff, v))
l := add(or(l, byte(and(0x1f, shr(shr(l, v), 0x8421084210842108cc6318c6db6d54be)),
0x0706060506020504060203020504030106050205030304010505030400000000)), 49)
w := sdiv(shl(l, 7), byte(sub(l, 31), 0x0303030303030303040506080c13))
c := gt(l, 60)
i := add(2, add(gt(l, 53), c))
}
} else {
int256 ll = lnWad(w = lnWad(w));
/// @solidity memory-safe-assembly
assembly {
// `w = ln(x) - ln(ln(x)) + b * ln(ln(x)) / ln(x)`.
w := add(sdiv(mul(ll, 1023715080943847266), w), sub(w, ll))
i := add(3, iszero(shr(68, x)))
c := iszero(shr(143, x))
}
if (c == uint256(0)) {
do { // If `x` is big, use Newton's so that intermediate values won't overflow.
int256 e = expWad(w);
/// @solidity memory-safe-assembly
assembly {
let t := mul(w, div(e, wad))
w := sub(w, sdiv(sub(t, x), div(add(e, t), wad)))
}
if (p <= w) break;
p = w;
} while (--i != uint256(0));
/// @solidity memory-safe-assembly
assembly {
w := sub(w, sgt(w, 2))
}
return w;
}
}
do { // Otherwise, use Halley's for faster convergence.
int256 e = expWad(w);
/// @solidity memory-safe-assembly
assembly {
let t := add(w, wad)
let s := sub(mul(w, e), mul(x, wad))
w := sub(w, sdiv(mul(s, wad), sub(mul(e, t), sdiv(mul(add(t, wad), s), add(t, t)))))
}
if (p <= w) break;
p = w;
} while (--i != c);
/// @solidity memory-safe-assembly
assembly {
w := sub(w, sgt(w, 2))
}
// For certain ranges of `x`, we'll use the quadratic-rate recursive formula of
// R. Iacono and J.P. Boyd for the last iteration, to avoid catastrophic cancellation.
if (c == uint256(0)) return w;
int256 t = w | 1;
/// @solidity memory-safe-assembly
assembly {
x := sdiv(mul(x, wad), t)
}
x = (t * (wad + lnWad(x)));
/// @solidity memory-safe-assembly
assembly {
w := sdiv(x, add(wad, t))
}
}
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* GENERAL NUMBER UTILITIES */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev Returns `a * b == x * y`, with full precision.
function fullMulEq(uint256 a, uint256 b, uint256 x, uint256 y)
internal
pure
returns (bool result)
{
/// @solidity memory-safe-assembly
assembly {
result := and(eq(mul(a, b), mul(x, y)), eq(mulmod(x, y, not(0)), mulmod(a, b, not(0))))
}
}
/// @dev Calculates `floor(x * y / d)` with full precision.
/// Throws if result overflows a uint256 or when `d` is zero.
/// Credit to Remco Bloemen under MIT license: https://2π.com/21/muldiv
function fullMulDiv(uint256 x, uint256 y, uint256 d) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
// 512-bit multiply `[p1 p0] = x * y`.
// Compute the product mod `2**256` and mod `2**256 - 1`
// then use the Chinese Remainder Theorem to reconstruct
// the 512 bit result. The result is stored in two 256
// variables such that `product = p1 * 2**256 + p0`.
// Temporarily use `z` as `p0` to save gas.
z := mul(x, y) // Lower 256 bits of `x * y`.
for {} 1 {} {
// If overflows.
if iszero(mul(or(iszero(x), eq(div(z, x), y)), d)) {
let mm := mulmod(x, y, not(0))
let p1 := sub(mm, add(z, lt(mm, z))) // Upper 256 bits of `x * y`.
/*------------------- 512 by 256 division --------------------*/
// Make division exact by subtracting the remainder from `[p1 p0]`.
let r := mulmod(x, y, d) // Compute remainder using mulmod.
let t := and(d, sub(0, d)) // The least significant bit of `d`. `t >= 1`.
// Make sure `z` is less than `2**256`. Also prevents `d == 0`.
// Placing the check here seems to give more optimal stack operations.
if iszero(gt(d, p1)) {
mstore(0x00, 0xae47f702) // `FullMulDivFailed()`.
revert(0x1c, 0x04)
}
d := div(d, t) // Divide `d` by `t`, which is a power of two.
// Invert `d mod 2**256`
// Now that `d` is an odd number, it has an inverse
// modulo `2**256` such that `d * inv = 1 mod 2**256`.
// Compute the inverse by starting with a seed that is correct
// correct for four bits. That is, `d * inv = 1 mod 2**4`.
let inv := xor(2, mul(3, d))
// Now use Newton-Raphson iteration to improve the precision.
// Thanks to Hensel's lifting lemma, this also works in modular
// arithmetic, doubling the correct bits in each step.
inv := mul(inv, sub(2, mul(d, inv))) // inverse mod 2**8
inv := mul(inv, sub(2, mul(d, inv))) // inverse mod 2**16
inv := mul(inv, sub(2, mul(d, inv))) // inverse mod 2**32
inv := mul(inv, sub(2, mul(d, inv))) // inverse mod 2**64
inv := mul(inv, sub(2, mul(d, inv))) // inverse mod 2**128
z :=
mul(
// Divide [p1 p0] by the factors of two.
// Shift in bits from `p1` into `p0`. For this we need
// to flip `t` such that it is `2**256 / t`.
or(mul(sub(p1, gt(r, z)), add(div(sub(0, t), t), 1)), div(sub(z, r), t)),
mul(sub(2, mul(d, inv)), inv) // inverse mod 2**256
)
break
}
z := div(z, d)
break
}
}
}
/// @dev Calculates `floor(x * y / d)` with full precision.
/// Behavior is undefined if `d` is zero or the final result cannot fit in 256 bits.
/// Performs the full 512 bit calculation regardless.
function fullMulDivUnchecked(uint256 x, uint256 y, uint256 d)
internal
pure
returns (uint256 z)
{
/// @solidity memory-safe-assembly
assembly {
z := mul(x, y)
let mm := mulmod(x, y, not(0))
let p1 := sub(mm, add(z, lt(mm, z)))
let t := and(d, sub(0, d))
let r := mulmod(x, y, d)
d := div(d, t)
let inv := xor(2, mul(3, d))
inv := mul(inv, sub(2, mul(d, inv)))
inv := mul(inv, sub(2, mul(d, inv)))
inv := mul(inv, sub(2, mul(d, inv)))
inv := mul(inv, sub(2, mul(d, inv)))
inv := mul(inv, sub(2, mul(d, inv)))
z :=
mul(
or(mul(sub(p1, gt(r, z)), add(div(sub(0, t), t), 1)), div(sub(z, r), t)),
mul(sub(2, mul(d, inv)), inv)
)
}
}
/// @dev Calculates `floor(x * y / d)` with full precision, rounded up.
/// Throws if result overflows a uint256 or when `d` is zero.
/// Credit to Uniswap-v3-core under MIT license:
/// https://github.com/Uniswap/v3-core/blob/main/contracts/libraries/FullMath.sol
function fullMulDivUp(uint256 x, uint256 y, uint256 d) internal pure returns (uint256 z) {
z = fullMulDiv(x, y, d);
/// @solidity memory-safe-assembly
assembly {
if mulmod(x, y, d) {
z := add(z, 1)
if iszero(z) {
mstore(0x00, 0xae47f702) // `FullMulDivFailed()`.
revert(0x1c, 0x04)
}
}
}
}
/// @dev Calculates `floor(x * y / 2 ** n)` with full precision.
/// Throws if result overflows a uint256.
/// Credit to Philogy under MIT license:
/// https://github.com/SorellaLabs/angstrom/blob/main/contracts/src/libraries/X128MathLib.sol
function fullMulDivN(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
// Temporarily use `z` as `p0` to save gas.
z := mul(x, y) // Lower 256 bits of `x * y`. We'll call this `z`.
for {} 1 {} {
if iszero(or(iszero(x), eq(div(z, x), y))) {
let k := and(n, 0xff) // `n`, cleaned.
let mm := mulmod(x, y, not(0))
let p1 := sub(mm, add(z, lt(mm, z))) // Upper 256 bits of `x * y`.
// | p1 | z |
// Before: | p1_0 ¦ p1_1 | z_0 ¦ z_1 |
// Final: | 0 ¦ p1_0 | p1_1 ¦ z_0 |
// Check that final `z` doesn't overflow by checking that p1_0 = 0.
if iszero(shr(k, p1)) {
z := add(shl(sub(256, k), p1), shr(k, z))
break
}
mstore(0x00, 0xae47f702) // `FullMulDivFailed()`.
revert(0x1c, 0x04)
}
z := shr(and(n, 0xff), z)
break
}
}
}
/// @dev Returns `floor(x * y / d)`.
/// Reverts if `x * y` overflows, or `d` is zero.
function mulDiv(uint256 x, uint256 y, uint256 d) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
z := mul(x, y)
// Equivalent to `require(d != 0 && (y == 0 || x <= type(uint256).max / y))`.
if iszero(mul(or(iszero(x), eq(div(z, x), y)), d)) {
mstore(0x00, 0xad251c27) // `MulDivFailed()`.
revert(0x1c, 0x04)
}
z := div(z, d)
}
}
/// @dev Returns `ceil(x * y / d)`.
/// Reverts if `x * y` overflows, or `d` is zero.
function mulDivUp(uint256 x, uint256 y, uint256 d) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
z := mul(x, y)
// Equivalent to `require(d != 0 && (y == 0 || x <= type(uint256).max / y))`.
if iszero(mul(or(iszero(x), eq(div(z, x), y)), d)) {
mstore(0x00, 0xad251c27) // `MulDivFailed()`.
revert(0x1c, 0x04)
}
z := add(iszero(iszero(mod(z, d))), div(z, d))
}
}
/// @dev Returns `x`, the modular multiplicative inverse of `a`, such that `(a * x) % n == 1`.
function invMod(uint256 a, uint256 n) internal pure returns (uint256 x) {
/// @solidity memory-safe-assembly
assembly {
let g := n
let r := mod(a, n)
for { let y := 1 } 1 {} {
let q := div(g, r)
let t := g
g := r
r := sub(t, mul(r, q))
let u := x
x := y
y := sub(u, mul(y, q))
if iszero(r) { break }
}
x := mul(eq(g, 1), add(x, mul(slt(x, 0), n)))
}
}
/// @dev Returns `ceil(x / d)`.
/// Reverts if `d` is zero.
function divUp(uint256 x, uint256 d) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
if iszero(d) {
mstore(0x00, 0x65244e4e) // `DivFailed()`.
revert(0x1c, 0x04)
}
z := add(iszero(iszero(mod(x, d))), div(x, d))
}
}
/// @dev Returns `max(0, x - y)`. Alias for `saturatingSub`.
function zeroFloorSub(uint256 x, uint256 y) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
z := mul(gt(x, y), sub(x, y))
}
}
/// @dev Returns `max(0, x - y)`.
function saturatingSub(uint256 x, uint256 y) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
z := mul(gt(x, y), sub(x, y))
}
}
/// @dev Returns `min(2 ** 256 - 1, x + y)`.
function saturatingAdd(uint256 x, uint256 y) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
z := or(sub(0, lt(add(x, y), x)), add(x, y))
}
}
/// @dev Returns `min(2 ** 256 - 1, x * y)`.
function saturatingMul(uint256 x, uint256 y) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
z := or(sub(or(iszero(x), eq(div(mul(x, y), x), y)), 1), mul(x, y))
}
}
/// @dev Returns `condition ? x : y`, without branching.
function ternary(bool condition, uint256 x, uint256 y) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
z := xor(x, mul(xor(x, y), iszero(condition)))
}
}
/// @dev Returns `condition ? x : y`, without branching.
function ternary(bool condition, bytes32 x, bytes32 y) internal pure returns (bytes32 z) {
/// @solidity memory-safe-assembly
assembly {
z := xor(x, mul(xor(x, y), iszero(condition)))
}
}
/// @dev Returns `condition ? x : y`, without branching.
function ternary(bool condition, address x, address y) internal pure returns (address z) {
/// @solidity memory-safe-assembly
assembly {
z := xor(x, mul(xor(x, y), iszero(condition)))
}
}
/// @dev Returns `x != 0 ? x : y`, without branching.
function coalesce(uint256 x, uint256 y) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
z := or(x, mul(y, iszero(x)))
}
}
/// @dev Returns `x != bytes32(0) ? x : y`, without branching.
function coalesce(bytes32 x, bytes32 y) internal pure returns (bytes32 z) {
/// @solidity memory-safe-assembly
assembly {
z := or(x, mul(y, iszero(x)))
}
}
/// @dev Returns `x != address(0) ? x : y`, without branching.
function coalesce(address x, address y) internal pure returns (address z) {
/// @solidity memory-safe-assembly
assembly {
z := or(x, mul(y, iszero(shl(96, x))))
}
}
/// @dev Exponentiate `x` to `y` by squaring, denominated in base `b`.
/// Reverts if the computation overflows.
function rpow(uint256 x, uint256 y, uint256 b) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
z := mul(b, iszero(y)) // `0 ** 0 = 1`. Otherwise, `0 ** n = 0`.
if x {
z := xor(b, mul(xor(b, x), and(y, 1))) // `z = isEven(y) ? scale : x`
let half := shr(1, b) // Divide `b` by 2.
// Divide `y` by 2 every iteration.
for { y := shr(1, y) } y { y := shr(1, y) } {
let xx := mul(x, x) // Store x squared.
let xxRound := add(xx, half) // Round to the nearest number.
// Revert if `xx + half` overflowed, or if `x ** 2` overflows.
if or(lt(xxRound, xx), shr(128, x)) {
mstore(0x00, 0x49f7642b) // `RPowOverflow()`.
revert(0x1c, 0x04)
}
x := div(xxRound, b) // Set `x` to scaled `xxRound`.
// If `y` is odd:
if and(y, 1) {
let zx := mul(z, x) // Compute `z * x`.
let zxRound := add(zx, half) // Round to the nearest number.
// If `z * x` overflowed or `zx + half` overflowed:
if or(xor(div(zx, x), z), lt(zxRound, zx)) {
// Revert if `x` is non-zero.
if x {
mstore(0x00, 0x49f7642b) // `RPowOverflow()`.
revert(0x1c, 0x04)
}
}
z := div(zxRound, b) // Return properly scaled `zxRound`.
}
}
}
}
}
/// @dev Returns the square root of `x`, rounded down.
function sqrt(uint256 x) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
// `floor(sqrt(2**15)) = 181`. `sqrt(2**15) - 181 = 2.84`.
z := 181 // The "correct" value is 1, but this saves a multiplication later.
// This segment is to get a reasonable initial estimate for the Babylonian method. With a bad
// start, the correct # of bits increases ~linearly each iteration instead of ~quadratically.
// Let `y = x / 2**r`. We check `y >= 2**(k + 8)`
// but shift right by `k` bits to ensure that if `x >= 256`, then `y >= 256`.
let r := shl(7, lt(0xffffffffffffffffffffffffffffffffff, x))
r := or(r, shl(6, lt(0xffffffffffffffffff, shr(r, x))))
r := or(r, shl(5, lt(0xffffffffff, shr(r, x))))
r := or(r, shl(4, lt(0xffffff, shr(r, x))))
z := shl(shr(1, r), z)
// Goal was to get `z*z*y` within a small factor of `x`. More iterations could
// get y in a tighter range. Currently, we will have y in `[256, 256*(2**16))`.
// We ensured `y >= 256` so that the relative difference between `y` and `y+1` is small.
// That's not possible if `x < 256` but we can just verify those cases exhaustively.
// Now, `z*z*y <= x < z*z*(y+1)`, and `y <= 2**(16+8)`, and either `y >= 256`, or `x < 256`.
// Correctness can be checked exhaustively for `x < 256`, so we assume `y >= 256`.
// Then `z*sqrt(y)` is within `sqrt(257)/sqrt(256)` of `sqrt(x)`, or about 20bps.
// For `s` in the range `[1/256, 256]`, the estimate `f(s) = (181/1024) * (s+1)`
// is in the range `(1/2.84 * sqrt(s), 2.84 * sqrt(s))`,
// with largest error when `s = 1` and when `s = 256` or `1/256`.
// Since `y` is in `[256, 256*(2**16))`, let `a = y/65536`, so that `a` is in `[1/256, 256)`.
// Then we can estimate `sqrt(y)` using
// `sqrt(65536) * 181/1024 * (a + 1) = 181/4 * (y + 65536)/65536 = 181 * (y + 65536)/2**18`.
// There is no overflow risk here since `y < 2**136` after the first branch above.
z := shr(18, mul(z, add(shr(r, x), 65536))) // A `mul()` is saved from starting `z` at 181.
// Given the worst case multiplicative error of 2.84 above, 7 iterations should be enough.
z := shr(1, add(z, div(x, z)))
z := shr(1, add(z, div(x, z)))
z := shr(1, add(z, div(x, z)))
z := shr(1, add(z, div(x, z)))
z := shr(1, add(z, div(x, z)))
z := shr(1, add(z, div(x, z)))
z := shr(1, add(z, div(x, z)))
// If `x+1` is a perfect square, the Babylonian method cycles between
// `floor(sqrt(x))` and `ceil(sqrt(x))`. This statement ensures we return floor.
// See: https://en.wikipedia.org/wiki/Integer_square_root#Using_only_integer_division
z := sub(z, lt(div(x, z), z))
}
}
/// @dev Returns the cube root of `x`, rounded down.
/// Credit to bout3fiddy and pcaversaccio under AGPLv3 license:
/// https://github.com/pcaversaccio/snekmate/blob/main/src/utils/Math.vy
/// Formally verified by xuwinnie:
/// https://github.com/vectorized/solady/blob/main/audits/xuwinnie-solady-cbrt-proof.pdf
function cbrt(uint256 x) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
let r := shl(7, lt(0xffffffffffffffffffffffffffffffff, x))
r := or(r, shl(6, lt(0xffffffffffffffff, shr(r, x))))
r := or(r, shl(5, lt(0xffffffff, shr(r, x))))
r := or(r, shl(4, lt(0xffff, shr(r, x))))
r := or(r, shl(3, lt(0xff, shr(r, x))))
// Makeshift lookup table to nudge the approximate log2 result.
z := div(shl(div(r, 3), shl(lt(0xf, shr(r, x)), 0xf)), xor(7, mod(r, 3)))
// Newton-Raphson's.
z := div(add(add(div(x, mul(z, z)), z), z), 3)
z := div(add(add(div(x, mul(z, z)), z), z), 3)
z := div(add(add(div(x, mul(z, z)), z), z), 3)
z := div(add(add(div(x, mul(z, z)), z), z), 3)
z := div(add(add(div(x, mul(z, z)), z), z), 3)
z := div(add(add(div(x, mul(z, z)), z), z), 3)
z := div(add(add(div(x, mul(z, z)), z), z), 3)
// Round down.
z := sub(z, lt(div(x, mul(z, z)), z))
}
}
/// @dev Returns the square root of `x`, denominated in `WAD`, rounded down.
function sqrtWad(uint256 x) internal pure returns (uint256 z) {
unchecked {
if (x <= type(uint256).max / 10 ** 18) return sqrt(x * 10 ** 18);
z = (1 + sqrt(x)) * 10 ** 9;
z = (fullMulDivUnchecked(x, 10 ** 18, z) + z) >> 1;
}
/// @solidity memory-safe-assembly
assembly {
z := sub(z, gt(999999999999999999, sub(mulmod(z, z, x), 1))) // Round down.
}
}
/// @dev Returns the cube root of `x`, denominated in `WAD`, rounded down.
/// Formally verified by xuwinnie:
/// https://github.com/vectorized/solady/blob/main/audits/xuwinnie-solady-cbrt-proof.pdf
function cbrtWad(uint256 x) internal pure returns (uint256 z) {
unchecked {
if (x <= type(uint256).max / 10 ** 36) return cbrt(x * 10 ** 36);
z = (1 + cbrt(x)) * 10 ** 12;
z = (fullMulDivUnchecked(x, 10 ** 36, z * z) + z + z) / 3;
}
/// @solidity memory-safe-assembly
assembly {
let p := x
for {} 1 {} {
if iszero(shr(229, p)) {
if iszero(shr(199, p)) {
p := mul(p, 100000000000000000) // 10 ** 17.
break
}
p := mul(p, 100000000) // 10 ** 8.
break
}
if iszero(shr(249, p)) { p := mul(p, 100) }
break
}
let t := mulmod(mul(z, z), z, p)
z := sub(z, gt(lt(t, shr(1, p)), iszero(t))) // Round down.
}
}
/// @dev Returns the factorial of `x`.
function factorial(uint256 x) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
z := 1
if iszero(lt(x, 58)) {
mstore(0x00, 0xaba0f2a2) // `FactorialOverflow()`.
revert(0x1c, 0x04)
}
for {} x { x := sub(x, 1) } { z := mul(z, x) }
}
}
/// @dev Returns the log2 of `x`.
/// Equivalent to computing the index of the most significant bit (MSB) of `x`.
/// Returns 0 if `x` is zero.
function log2(uint256 x) internal pure returns (uint256 r) {
/// @solidity memory-safe-assembly
assembly {
r := shl(7, lt(0xffffffffffffffffffffffffffffffff, x))
r := or(r, shl(6, lt(0xffffffffffffffff, shr(r, x))))
r := or(r, shl(5, lt(0xffffffff, shr(r, x))))
r := or(r, shl(4, lt(0xffff, shr(r, x))))
r := or(r, shl(3, lt(0xff, shr(r, x))))
// forgefmt: disable-next-item
r := or(r, byte(and(0x1f, shr(shr(r, x), 0x8421084210842108cc6318c6db6d54be)),
0x0706060506020504060203020504030106050205030304010505030400000000))
}
}
/// @dev Returns the log2 of `x`, rounded up.
/// Returns 0 if `x` is zero.
function log2Up(uint256 x) internal pure returns (uint256 r) {
r = log2(x);
/// @solidity memory-safe-assembly
assembly {
r := add(r, lt(shl(r, 1), x))
}
}
/// @dev Returns the log10 of `x`.
/// Returns 0 if `x` is zero.
function log10(uint256 x) internal pure returns (uint256 r) {
/// @solidity memory-safe-assembly
assembly {
if iszero(lt(x, 100000000000000000000000000000000000000)) {
x := div(x, 100000000000000000000000000000000000000)
r := 38
}
if iszero(lt(x, 100000000000000000000)) {
x := div(x, 100000000000000000000)
r := add(r, 20)
}
if iszero(lt(x, 10000000000)) {
x := div(x, 10000000000)
r := add(r, 10)
}
if iszero(lt(x, 100000)) {
x := div(x, 100000)
r := add(r, 5)
}
r := add(r, add(gt(x, 9), add(gt(x, 99), add(gt(x, 999), gt(x, 9999)))))
}
}
/// @dev Returns the log10 of `x`, rounded up.
/// Returns 0 if `x` is zero.
function log10Up(uint256 x) internal pure returns (uint256 r) {
r = log10(x);
/// @solidity memory-safe-assembly
assembly {
r := add(r, lt(exp(10, r), x))
}
}
/// @dev Returns the log256 of `x`.
/// Returns 0 if `x` is zero.
function log256(uint256 x) internal pure returns (uint256 r) {
/// @solidity memory-safe-assembly
assembly {
r := shl(7, lt(0xffffffffffffffffffffffffffffffff, x))
r := or(r, shl(6, lt(0xffffffffffffffff, shr(r, x))))
r := or(r, shl(5, lt(0xffffffff, shr(r, x))))
r := or(r, shl(4, lt(0xffff, shr(r, x))))
r := or(shr(3, r), lt(0xff, shr(r, x)))
}
}
/// @dev Returns the log256 of `x`, rounded up.
/// Returns 0 if `x` is zero.
function log256Up(uint256 x) internal pure returns (uint256 r) {
r = log256(x);
/// @solidity memory-safe-assembly
assembly {
r := add(r, lt(shl(shl(3, r), 1), x))
}
}
/// @dev Returns the scientific notation format `mantissa * 10 ** exponent` of `x`.
/// Useful for compressing prices (e.g. using 25 bit mantissa and 7 bit exponent).
function sci(uint256 x) internal pure returns (uint256 mantissa, uint256 exponent) {
/// @solidity memory-safe-assembly
assembly {
mantissa := x
if mantissa {
if iszero(mod(mantissa, 1000000000000000000000000000000000)) {
mantissa := div(mantissa, 1000000000000000000000000000000000)
exponent := 33
}
if iszero(mod(mantissa, 10000000000000000000)) {
mantissa := div(mantissa, 10000000000000000000)
exponent := add(exponent, 19)
}
if iszero(mod(mantissa, 1000000000000)) {
mantissa := div(mantissa, 1000000000000)
exponent := add(exponent, 12)
}
if iszero(mod(mantissa, 1000000)) {
mantissa := div(mantissa, 1000000)
exponent := add(exponent, 6)
}
if iszero(mod(mantissa, 10000)) {
mantissa := div(mantissa, 10000)
exponent := add(exponent, 4)
}
if iszero(mod(mantissa, 100)) {
mantissa := div(mantissa, 100)
exponent := add(exponent, 2)
}
if iszero(mod(mantissa, 10)) {
mantissa := div(mantissa, 10)
exponent := add(exponent, 1)
}
}
}
}
/// @dev Convenience function for packing `x` into a smaller number using `sci`.
/// The `mantissa` will be in bits [7..255] (the upper 249 bits).
/// The `exponent` will be in bits [0..6] (the lower 7 bits).
/// Use `SafeCastLib` to safely ensure that the `packed` number is small
/// enough to fit in the desired unsigned integer type:
/// ```
/// uint32 packed = SafeCastLib.toUint32(FixedPointMathLib.packSci(777 ether));
/// ```
function packSci(uint256 x) internal pure returns (uint256 packed) {
(x, packed) = sci(x); // Reuse for `mantissa` and `exponent`.
/// @solidity memory-safe-assembly
assembly {
if shr(249, x) {
mstore(0x00, 0xce30380c) // `MantissaOverflow()`.
revert(0x1c, 0x04)
}
packed := or(shl(7, x), packed)
}
}
/// @dev Convenience function for unpacking a packed number from `packSci`.
function unpackSci(uint256 packed) internal pure returns (uint256 unpacked) {
unchecked {
unpacked = (packed >> 7) * 10 ** (packed & 0x7f);
}
}
/// @dev Returns the average of `x` and `y`. Rounds towards zero.
function avg(uint256 x, uint256 y) internal pure returns (uint256 z) {
unchecked {
z = (x & y) + ((x ^ y) >> 1);
}
}
/// @dev Returns the average of `x` and `y`. Rounds towards negative infinity.
function avg(int256 x, int256 y) internal pure returns (int256 z) {
unchecked {
z = (x >> 1) + (y >> 1) + (x & y & 1);
}
}
/// @dev Returns the absolute value of `x`.
function abs(int256 x) internal pure returns (uint256 z) {
unchecked {
z = (uint256(x) + uint256(x >> 255)) ^ uint256(x >> 255);
}
}
/// @dev Returns the absolute distance between `x` and `y`.
function dist(uint256 x, uint256 y) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
z := add(xor(sub(0, gt(x, y)), sub(y, x)), gt(x, y))
}
}
/// @dev Returns the absolute distance between `x` and `y`.
function dist(int256 x, int256 y) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
z := add(xor(sub(0, sgt(x, y)), sub(y, x)), sgt(x, y))
}
}
/// @dev Returns the minimum of `x` and `y`.
function min(uint256 x, uint256 y) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
z := xor(x, mul(xor(x, y), lt(y, x)))
}
}
/// @dev Returns the minimum of `x` and `y`.
function min(int256 x, int256 y) internal pure returns (int256 z) {
/// @solidity memory-safe-assembly
assembly {
z := xor(x, mul(xor(x, y), slt(y, x)))
}
}
/// @dev Returns the maximum of `x` and `y`.
function max(uint256 x, uint256 y) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
z := xor(x, mul(xor(x, y), gt(y, x)))
}
}
/// @dev Returns the maximum of `x` and `y`.
function max(int256 x, int256 y) internal pure returns (int256 z) {
/// @solidity memory-safe-assembly
assembly {
z := xor(x, mul(xor(x, y), sgt(y, x)))
}
}
/// @dev Returns `x`, bounded to `minValue` and `maxValue`.
function clamp(uint256 x, uint256 minValue, uint256 maxValue)
internal
pure
returns (uint256 z)
{
/// @solidity memory-safe-assembly
assembly {
z := xor(x, mul(xor(x, minValue), gt(minValue, x)))
z := xor(z, mul(xor(z, maxValue), lt(maxValue, z)))
}
}
/// @dev Returns `x`, bounded to `minValue` and `maxValue`.
function clamp(int256 x, int256 minValue, int256 maxValue) internal pure returns (int256 z) {
/// @solidity memory-safe-assembly
assembly {
z := xor(x, mul(xor(x, minValue), sgt(minValue, x)))
z := xor(z, mul(xor(z, maxValue), slt(maxValue, z)))
}
}
/// @dev Returns greatest common divisor of `x` and `y`.
function gcd(uint256 x, uint256 y) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
for { z := x } y {} {
let t := y
y := mod(z, y)
z := t
}
}
}
/// @dev Returns `a + (b - a) * (t - begin) / (end - begin)`,
/// with `t` clamped between `begin` and `end` (inclusive).
/// Agnostic to the order of (`a`, `b`) and (`end`, `begin`).
/// If `begins == end`, returns `t <= begin ? a : b`.
function lerp(uint256 a, uint256 b, uint256 t, uint256 begin, uint256 end)
internal
pure
returns (uint256)
{
if (begin > end) (t, begin, end) = (~t, ~begin, ~end);
if (t <= begin) return a;
if (t >= end) return b;
unchecked {
if (b >= a) return a + fullMulDiv(b - a, t - begin, end - begin);
return a - fullMulDiv(a - b, t - begin, end - begin);
}
}
/// @dev Returns `a + (b - a) * (t - begin) / (end - begin)`.
/// with `t` clamped between `begin` and `end` (inclusive).
/// Agnostic to the order of (`a`, `b`) and (`end`, `begin`).
/// If `begins == end`, returns `t <= begin ? a : b`.
function lerp(int256 a, int256 b, int256 t, int256 begin, int256 end)
internal
pure
returns (int256)
{
if (begin > end) (t, begin, end) = (~t, ~begin, ~end);
if (t <= begin) return a;
if (t >= end) return b;
// forgefmt: disable-next-item
unchecked {
if (b >= a) return int256(uint256(a) + fullMulDiv(uint256(b - a),
uint256(t - begin), uint256(end - begin)));
return int256(uint256(a) - fullMulDiv(uint256(a - b),
uint256(t - begin), uint256(end - begin)));
}
}
/// @dev Returns if `x` is an even number. Some people may need this.
function isEven(uint256 x) internal pure returns (bool) {
return x & uint256(1) == uint256(0);
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* RAW NUMBER OPERATIONS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev Returns `x + y`, without checking for overflow.
function rawAdd(uint256 x, uint256 y) internal pure returns (uint256 z) {
unchecked {
z = x + y;
}
}
/// @dev Returns `x + y`, without checking for overflow.
function rawAdd(int256 x, int256 y) internal pure returns (int256 z) {
unchecked {
z = x + y;
}
}
/// @dev Returns `x - y`, without checking for underflow.
function rawSub(uint256 x, uint256 y) internal pure returns (uint256 z) {
unchecked {
z = x - y;
}
}
/// @dev Returns `x - y`, without checking for underflow.
function rawSub(int256 x, int256 y) internal pure returns (int256 z) {
unchecked {
z = x - y;
}
}
/// @dev Returns `x * y`, without checking for overflow.
function rawMul(uint256 x, uint256 y) internal pure returns (uint256 z) {
unchecked {
z = x * y;
}
}
/// @dev Returns `x * y`, without checking for overflow.
function rawMul(int256 x, int256 y) internal pure returns (int256 z) {
unchecked {
z = x * y;
}
}
/// @dev Returns `x / y`, returning 0 if `y` is zero.
function rawDiv(uint256 x, uint256 y) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
z := div(x, y)
}
}
/// @dev Returns `x / y`, returning 0 if `y` is zero.
function rawSDiv(int256 x, int256 y) internal pure returns (int256 z) {
/// @solidity memory-safe-assembly
assembly {
z := sdiv(x, y)
}
}
/// @dev Returns `x % y`, returning 0 if `y` is zero.
function rawMod(uint256 x, uint256 y) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
z := mod(x, y)
}
}
/// @dev Returns `x % y`, returning 0 if `y` is zero.
function rawSMod(int256 x, int256 y) internal pure returns (int256 z) {
/// @solidity memory-safe-assembly
assembly {
z := smod(x, y)
}
}
/// @dev Returns `(x + y) % d`, return 0 if `d` if zero.
function rawAddMod(uint256 x, uint256 y, uint256 d) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
z := addmod(x, y, d)
}
}
/// @dev Returns `(x * y) % d`, return 0 if `d` if zero.
function rawMulMod(uint256 x, uint256 y, uint256 d) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
z := mulmod(x, y, d)
}
}
}// 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;
}
}{
"viaIR": false,
"codegen": "yul",
"remappings": [
"@openzeppelin/=lib/openzeppelin-contracts/contracts/",
"solady/=lib/solady/src/",
"erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
"forge-std/=lib/forge-std/src/",
"halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/"
],
"evmVersion": "cancun",
"outputSelection": {
"*": {
"*": [
"abi"
]
}
},
"optimizer": {
"enabled": true,
"mode": "3",
"fallback_to_optimizing_for_size": false,
"disable_system_request_memoization": true
},
"metadata": {},
"libraries": {},
"enableEraVMExtensions": false,
"forceEVMLA": false
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"uint256","name":"_maturityDate","type":"uint256"},{"internalType":"uint256","name":"_maxCap","type":"uint256"},{"internalType":"address","name":"_bigcoin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyClaimed","type":"error"},{"inputs":[],"name":"InvalidAddress","type":"error"},{"inputs":[],"name":"InvalidCap","type":"error"},{"inputs":[],"name":"InvalidDate","type":"error"},{"inputs":[],"name":"InvalidMaxCap","type":"error"},{"inputs":[],"name":"MaturityDateNotReached","type":"error"},{"inputs":[],"name":"MaturityDateReached","type":"error"},{"inputs":[],"name":"MaxCapReached","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"TooSoon","type":"error"},{"inputs":[],"name":"WalletCapReached","type":"error"},{"inputs":[],"name":"WithdrawFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"depositor","type":"address"},{"indexed":false,"internalType":"uint256","name":"depositAmt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalDeposits","type":"uint256"}],"name":"NewDeposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxCap","type":"uint256"}],"name":"NewMaxCapSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"bigcoin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimUnclaimed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"depositor","type":"address"}],"name":"claimedAmt","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amt","type":"uint256"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maturityDate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxCap","type":"uint256"}],"name":"setMaxCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"cap","type":"uint256"}],"name":"setWalletCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalDeposits","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userClaimedEthAmt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userDeposits","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"depositor","type":"address"}],"name":"viewRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"walletCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
9c4d535b0000000000000000000000000000000000000000000000000000000000000000010001d162ffb64e07303d94bf8d8671cd168d6cb5dba381018d7c8950eec5b90000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000680b9560000000000000000000000000000000000000000000000fe1c215e8f838e00000000000000000000000000000df70075737e9f96b078ab4461eee3e055e061223
Deployed Bytecode
0x00010000000000020008000000000002000000000001035500000060031002700000017b0330019700000001002001900000001e0000c13d0000008002000039000000400020043f000000040030008c000000490000413d000000000201043b000000e0022002700000018c0020009c0000006e0000a13d0000018d0020009c000000850000213d000001940020009c000000d50000a13d000001950020009c0000014c0000613d000001960020009c000001510000613d000001970020009c000005250000c13d0000000001000416000000000001004b000005250000c13d0000000101000039000002610000013d0000000002000416000000000002004b000005250000c13d0000001f023000390000017c02200197000000c002200039000000400020043f0000001f0430018f0000017d05300198000000c0025000390000002f0000613d000000c006000039000000000701034f000000007807043c0000000006860436000000000026004b0000002b0000c13d000000000004004b0000003c0000613d000000000151034f0000000304400210000000000502043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600030008c000005250000413d000001000400043d0000017e0040009c000005250000213d0000000006000411000000000006004b000000ad0000c13d000001a901000041000000000010043f000000040000043f000001a801000041000005ea00010430000000000003004b000005250000c13d0000018a010000410000000000100443000000000100041200000004001004430000002001000039000000240010044300000000010004140000017b0010009c0000017b01008041000000c0011002100000018b011001c7000080050200003905e805e30000040f0000000100200190000005270000613d000000000101043b000400000001001d0000018201000041000000000010044300000000010004140000017b0010009c0000017b01008041000000c00110021000000183011001c70000800b0200003905e805e30000040f0000000100200190000005270000613d000000000101043b000000040010006c000001430000a13d000001b501000041000000000010043f0000018701000041000005ea000104300000019a0020009c000000990000a13d0000019b0020009c0000010e0000a13d0000019c0020009c000001560000613d0000019d0020009c0000016e0000613d0000019e0020009c000005250000c13d000000240030008c000005250000413d0000000001000416000000000001004b000005250000c13d05e805900000040f00000004010000390000000001100367000000000101043b0000000702000039000000000012041b0000000001000019000005e90001042e0000018e0020009c000001170000a13d0000018f0020009c0000017f0000613d000001900020009c0000019a0000613d000001910020009c000005250000c13d000000240030008c000005250000413d0000000002000416000000000002004b000005250000c13d0000000401100370000000000101043b0000017e0010009c000005250000213d000000000010043f0000000601000039000000aa0000013d000001a10020009c0000012b0000213d000001a40020009c000001b90000613d000001a50020009c000005250000c13d000000240030008c000005250000413d0000000002000416000000000002004b000005250000c13d0000000401100370000000000101043b0000017e0010009c000005250000213d000000000010043f0000000401000039000000200010043f05e805b30000040f000002610000013d000000e00100043d000200000001001d000000c00100043d000400000001001d000000000100041a0000017f02100197000000000262019f000000000020041b00000000020004140000017e051001970000017b0020009c0000017b02008041000000c00120021000000180011001c70000800d020000390000000303000039000300000004001d000001810400004105e805de0000040f0000000100200190000005250000613d0000018201000041000000000010044300000000010004140000017b0010009c0000017b01008041000000c00110021000000183011001c70000800b0200003905e805e30000040f0000000100200190000005270000613d000000000101043b0000000405000029000000000015004b0000026a0000813d0000018901000041000000000010043f0000018701000041000005ea00010430000001980020009c000001d90000613d000001990020009c000005250000c13d000000240030008c000005250000413d0000000002000416000000000002004b000005250000c13d0000000401100370000000000301043b000000000100041a0000017e021001970000000001000411000000000012004b000002710000c13d000400000003001d0000018a010000410000000000100443000000000100041200000004001004430000002001000039000000240010044300000000010004140000017b0010009c0000017b01008041000000c0011002100000018b011001c7000080050200003905e805e30000040f0000000100200190000005270000613d000000000101043b000300000001001d0000018201000041000000000010044300000000010004140000017b0010009c0000017b01008041000000c00110021000000183011001c70000800b0200003905e805e30000040f0000000100200190000005270000613d000000000101043b000000030010006c0000006a0000213d0000000301000039000000000101041a0000000402000029000000000012004b000002e70000813d000001b401000041000000000010043f0000018701000041000005ea000104300000019f0020009c000001f10000613d000001a00020009c000005250000c13d0000000001000416000000000001004b000005250000c13d0000000701000039000002610000013d000001920020009c0000024c0000613d000001930020009c000005250000c13d0000000001000416000000000001004b000005250000c13d0000000001000412000600000001001d000500200000003d000080050100003900000044030000390000000004000415000000060440008a00000005044002100000018a0200004105e805c00000040f000000800010043f000001a601000041000005e90001042e000001a20020009c0000025d0000613d000001a30020009c000005250000c13d000000240030008c000005250000413d0000000002000416000000000002004b000005250000c13d0000000401100370000000000101043b0000017e0010009c000005250000213d000000000010043f0000000501000039000000200010043f05e805b30000040f000000000101041a000000ff001001900000000001000039000000010100c039000000800010043f000001a601000041000005e90001042e0000000101000039000000000201041a0000000003000416000000000032001a000001d30000413d0000000002320019000000000021041b0000000001000019000005e90001042e0000000001000416000000000001004b000005250000c13d0000000301000039000002610000013d0000000001000416000000000001004b000005250000c13d000000000100041a0000017b0000013d000000240030008c000005250000413d0000000002000416000000000002004b000005250000c13d0000000401100370000000000101043b0000017e0010009c000005250000213d000000000010043f0000000601000039000000200010043f05e805b30000040f000000000101041a000400000001001d0000000401000039000000200010043f05e805b30000040f000000000101041a0000000402000029000000800020043f000000a00010043f000001b601000041000005e90001042e0000000001000416000000000001004b000005250000c13d0000000001000412000800000001001d000700000000003d000080050100003900000044030000390000000004000415000000080440008a00000005044002100000018a0200004105e805c00000040f0000017e01100197000000800010043f000001a601000041000005e90001042e000000240030008c000005250000413d0000000002000416000000000002004b000005250000c13d0000000401100370000000000101043b0000017e0010009c000005250000213d000000000010043f0000000401000039000000200010043f05e805b30000040f0000000302000039000000000202041a000000000101041a05e8059b0000040f0000000102000039000000000202041a05e805a60000040f000000400200043d00000000001204350000017b0020009c0000017b020080410000004001200210000001aa011001c7000005e90001042e000000240030008c000005250000413d0000000002000416000000000002004b000005250000c13d0000000401100370000000000101043b0000017e0010009c000005250000213d000000000200041a0000017e032001970000000005000411000000000053004b000002650000c13d0000017e06100198000000440000613d0000017f01200197000000000161019f000000000010041b00000000010004140000017b0010009c0000017b01008041000000c00110021000000180011001c70000800d020000390000000303000039000001810400004105e805de0000040f0000000100200190000001ef0000c13d000005250000013d0000000001000416000000000001004b000005250000c13d000000000100041a0000017e011001970000000002000411000000000021004b000002760000c13d0000018a010000410000000000100443000000000100041200000004001004430000002001000039000000240010044300000000010004140000017b0010009c0000017b01008041000000c0011002100000018b011001c7000080050200003905e805e30000040f0000000100200190000005270000613d000000000101043b000001c30110009c000002d00000413d000001c801000041000000000010043f0000001101000039000000040010043f000001a801000041000005ea000104300000000001000416000000000001004b000005250000c13d000000000100041a0000017e021001970000000005000411000000000052004b000002650000c13d0000017f01100197000000000010041b00000000010004140000017b0010009c0000017b01008041000000c00110021000000180011001c70000800d0200003900000003030000390000018104000041000000000600001905e805de0000040f0000000100200190000005250000613d0000000001000019000005e90001042e0000000001000416000000000001004b000005250000c13d0000018a010000410000000000100443000000000100041200000004001004430000002001000039000000240010044300000000010004140000017b0010009c0000017b01008041000000c0011002100000018b011001c7000080050200003905e805e30000040f0000000100200190000005270000613d000000000101043b000400000001001d0000018201000041000000000010044300000000010004140000017b0010009c0000017b01008041000000c00110021000000183011001c70000800b0200003905e805e30000040f0000000100200190000005270000613d000000000101043b000000040010006c000002e30000a13d0000000001000411000000000010043f0000000501000039000000200010043f00000000010004140000017b0010009c0000017b01008041000000c001100210000001ab011001c7000080100200003905e805e30000040f0000000100200190000005250000613d000000000101043b000000000201041a000000ff00200190000002fb0000c13d000001ca0220019700000001022001bf000000000021041b0000000001000411000000000010043f0000000401000039000000200010043f00000000010004140000017b0010009c0000017b01008041000000c001100210000001ab011001c7000080100200003905e805e30000040f0000000100200190000005250000613d0000000302000039000000000202041a000000000101043b000000000101041a000001b90010009c000003b00000213d000000000002004b000003b00000613d000200000001001d000001ba011000d100040000002100e10000000101000039000000000101041a000300000001001d000000000001004b000004730000613d000000010100008a00000003011000fa000000040010006c000004730000813d000001bb01000041000000000010043f000001bc01000041000005ea00010430000000240030008c000005250000413d0000000002000416000000000002004b000005250000c13d0000000401100370000000000201043b0000000201000039000000000301041a0000000301000039000000000101041a000000000013004b0000027b0000c13d000001b101000041000000000010043f0000018701000041000005ea000104300000000001000416000000000001004b000005250000c13d0000000201000039000000000101041a000000800010043f000001a601000041000005e90001042e000001a701000041000000000010043f000000040050043f000001a801000041000005ea0001043000000003040000290000017e00400198000002b90000c13d0000018801000041000000000010043f0000018701000041000005ea00010430000001a702000041000000000020043f000000040010043f000001a801000041000005ea00010430000001a701000041000000000010043f000000040020043f000001a801000041000005ea00010430000300000001001d000200000003001d000400000002001d0000018a010000410000000000100443000000000100041200000004001004430000002001000039000000240010044300000000010004140000017b0010009c0000017b01008041000000c0011002100000018b011001c7000080050200003905e805e30000040f0000000100200190000005270000613d000000000101043b000100000001001d0000018201000041000000000010044300000000010004140000017b0010009c0000017b01008041000000c00110021000000183011001c70000800b0200003905e805e30000040f0000000100200190000005270000613d000000000101043b000000010010006c0000006a0000213d0000000001000411000000000010043f0000000401000039000000200010043f00000000010004140000017b0010009c0000017b01008041000000c001100210000001ab011001c7000080100200003905e805e30000040f0000000100200190000005250000613d000000000101043b000000000101041a0000000403000029000000000031001a0000000304000029000001d30000413d00000000013100190000000702000039000000000202041a000000000021004b000003150000a13d000001b001000041000000000010043f0000018701000041000005ea000104300000000202000029000000000002004b000002c00000c13d0000018601000041000000000010043f0000018701000041000005ea00010430000000a00050043f0000000201000039000000000021041b000000800040043f00000184020000410000000703000039000000000023041b0000014000000443000001600040044300000020020000390000018000200443000001a000500443000001000020044300000120001004430000018501000041000005e90001042e000400000001001d0000018201000041000000000010044300000000010004140000017b0010009c0000017b01008041000000c00110021000000183011001c70000800b0200003905e805e30000040f0000000100200190000005270000613d000000000101043b000000040010006c000002ff0000813d000001c901000041000000000010043f0000018701000041000005ea00010430000001b701000041000000000010043f0000018701000041000005ea000104300000000201000039000000000021041b000000400100043d00000000002104350000017b0010009c0000017b01008041000000400110021000000000020004140000017b0020009c0000017b02008041000000c002200210000000000112019f000001b2011001c70000800d020000390000000103000039000001b30400004105e805de0000040f0000000100200190000001ef0000c13d000005250000013d000001b801000041000000000010043f0000018701000041000005ea00010430000001c40100004100000000001004430000000001000410000000040010044300000000010004140000017b0010009c0000017b01008041000000c001100210000001c5011001c70000800a0200003905e805e30000040f0000000100200190000005270000613d000000000301043b00000000010004140000017b0010009c0000017b01008041000000c001100210000000000003004b000003b40000c13d0000000002000411000003b80000013d000000000034001a000001d30000413d00000000013400190000000202000029000000000021004b0000031e0000a13d000000000142004b000001d30000413d000400000001001d0000000001000411000000000010043f0000000401000039000000200010043f00000000010004140000017b0010009c0000017b01008041000000c001100210000001ab011001c7000080100200003905e805e30000040f0000000100200190000005250000613d000000000101043b000000000201041a0000000403000029000000000032001a000001d30000413d0000000002320019000000000021041b0000000301000039000000000101041a000000000031001a000001d30000413d00000000013100190000000302000039000000000012041b000000400400043d00000044014000390000000000310435000000240140003900000000020004100000000000210435000001ac010000410000000000140435000300000004001d0000000401400039000000000200041100000000002104350000018a01000041000000000010044300000000010004120000000400100443000000240000044300000000010004140000017b0010009c0000017b01008041000000c0011002100000018b011001c7000080050200003905e805e30000040f0000000100200190000005270000613d000000000201043b00000003010000290000017b0010009c0000017b01008041000000400110021000000000030004140000017b0030009c0000017b03008041000000c003300210000000000113019f000001ad011001c70000017e0220019705e805de0000040f00000060031002700000017b03300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000003057000290000036f0000613d000000000801034f0000000309000029000000008a08043c0000000009a90436000000000059004b0000036b0000c13d000000000006004b0000037c0000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f000000000065043500000001002001900000048e0000613d0000001f01400039000000600210018f0000000301200029000000000021004b00000000020000390000000102004039000001ae0010009c000005520000213d0000000100200190000005520000c13d000000400010043f000000200030008c000005250000413d00000003020000290000000002020433000000000002004b0000000003000039000000010300c039000000000032004b000005250000c13d0000000302000039000000000202041a00000020031000390000000000230435000000040200002900000000002104350000017b0010009c0000017b01008041000000400110021000000000020004140000017b0020009c0000017b02008041000000c002200210000000000112019f000001ab011001c70000800d020000390000000203000039000001af04000041000000000500041105e805de0000040f0000000100200190000005250000613d000000400100043d000000040200002900000000002104350000017b0010009c0000017b010080410000004001100210000001aa011001c7000005e90001042e000001c201000041000000000010043f000001bc01000041000005ea0001043000000180011001c700008009020000390000000004000411000000000500001905e805de0000040f00000060031002700000017b033001980000044d0000c13d0000000100200190000005280000613d0000018a01000041000000000010044300000000010004120000000400100443000000240000044300000000010004140000017b0010009c0000017b01008041000000c0011002100000018b011001c7000080050200003905e805e30000040f0000000100200190000005270000613d000000000201043b000000400400043d000400000004001d000001c70100004100000000001404350000000401400039000000000300041000000000003104350000017b0040009c0000017b010000410000000001044019000000400110021000000000030004140000017b0030009c0000017b03008041000000c003300210000000000113019f000001a8011001c70000017e02200197000200000002001d05e805e30000040f00000060031002700000017b03300197000000200030008c000000200400003900000000040340190000001f0640018f0000002007400190000000040b0000290000000405700029000003f10000613d000000000801034f00000000090b0019000000008a08043c0000000009a90436000000000059004b000003ed0000c13d000000000006004b000003fe0000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f000000000065043500000001002001900000049a0000613d0000001f01400039000000600110018f0000000002b10019000000000012004b00000000010000390000000101004039000300000002001d000001ae0020009c000005520000213d0000000100100190000005520000c13d0000000301000029000000400010043f000000200030008c000005250000413d00000000010b0433000000030300002900000024023000390000000000120435000001bf01000041000000000013043500000000010004110000017e01100197000000040230003900000000001204350000017b0030009c0000017b010000410000000001034019000000400110021000000000020004140000017b0020009c0000017b02008041000000c002200210000000000112019f000001c0011001c7000000020200002905e805de0000040f00000060031002700000017b03300197000000200030008c000000200400003900000000040340190000001f0540018f000000000a04001900000020064001900000000304600029000004350000613d000000000701034f0000000308000029000000007907043c0000000008980436000000000048004b000004310000c13d000000000005004b000004420000613d000000000661034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f00000000005404350000000100200190000005640000613d000000030100002900000000020a001900040000000a001d05e805700000040f0000000301000029000000040210002905e805820000040f0000000001000019000005e90001042e0000001f043000390000017c044001970000003f04400039000001be04400197000000400500043d0000000004450019000000000054004b00000000060000390000000106004039000001ae0040009c000005520000213d0000000100600190000005520000c13d000000400040043f0000001f0430018f00000000063504360000017d053001980000000003560019000004650000613d000000000701034f000000007807043c0000000006860436000000000036004b000004610000c13d000000000004004b000003bc0000613d000000000151034f0000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000130435000003bc0000013d0000000001000411000000000010043f0000000601000039000000200010043f00000000010004140000017b0010009c0000017b01008041000000c001100210000001ab011001c7000080100200003905e805e30000040f0000000100200190000005250000613d000000030300002900000004023000b9000001ba0320012a000000000101043b000400000003001d000000000031041b00000000010004140000017b0010009c0000017b01008041000000c001100210000001bd0020009c000004b80000213d0000000002000411000004bd0000013d0000001f0530018f0000017d06300198000000400200043d0000000004620019000004a50000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000004950000c13d000004a50000013d0000001f0530018f0000017d06300198000000400200043d0000000004620019000004a50000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000004a10000c13d000000000005004b000004b20000613d000000000161034f0000000305500210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f000000000014043500000060013002100000017b0020009c0000017b020080410000004002200210000000000112019f000005ea0001043000000180011001c7000080090200003900000004030000290000000004000411000000000500001905e805de0000040f00000060031002700000017b033001980000052c0000c13d0000000100200190000005280000613d000000400300043d000000240130003900000002020000290000000000210435000001bf01000041000000000013043500000000010004110000017e01100197000300000003001d000000040230003900000000001204350000018a01000041000000000010044300000000010004120000000400100443000000240000044300000000010004140000017b0010009c0000017b01008041000000c0011002100000018b011001c7000080050200003905e805e30000040f0000000100200190000005270000613d000000000201043b00000003010000290000017b0010009c0000017b01008041000000400110021000000000030004140000017b0030009c0000017b03008041000000c003300210000000000113019f000001c0011001c70000017e0220019705e805de0000040f00000060031002700000017b03300197000000200030008c000000200400003900000000040340190000001f0640018f00000020074001900000000305700029000004f80000613d000000000801034f0000000309000029000000008a08043c0000000009a90436000000000059004b000004f40000c13d000000000006004b000005050000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f00000000006504350000000100200190000005580000613d0000001f01400039000000600210018f0000000301200029000000000021004b00000000020000390000000102004039000001ae0010009c000005520000213d0000000100200190000005520000c13d000000400010043f000000200030008c000005250000413d00000003020000290000000002020433000000000002004b0000000003000039000000010300c039000000000032004b000005250000c13d000000200210003900000002030000290000000000320435000000040200002900000000002104350000017b0010009c0000017b010080410000004001100210000001c1011001c7000005e90001042e0000000001000019000005ea00010430000000000001042f000001c601000041000000000010043f0000018701000041000005ea000104300000001f043000390000017c044001970000003f04400039000001be04400197000000400500043d0000000004450019000000000054004b00000000060000390000000106004039000001ae0040009c000005520000213d0000000100600190000005520000c13d000000400040043f0000001f0430018f00000000063504360000017d053001980000000003560019000005440000613d000000000701034f000000007807043c0000000006860436000000000036004b000005400000c13d000000000004004b000004c10000613d000000000151034f0000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000130435000004c10000013d000001c801000041000000000010043f0000004101000039000000040010043f000001a801000041000005ea000104300000001f0530018f0000017d06300198000000400200043d0000000004620019000004a50000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b0000055f0000c13d000004a50000013d0000001f0530018f0000017d06300198000000400200043d0000000004620019000004a50000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b0000056b0000c13d000004a50000013d0000001f02200039000001cb022001970000000001120019000000000021004b00000000020000390000000102004039000001ae0010009c0000057c0000213d00000001002001900000057c0000c13d000000400010043f000000000001042d000001c801000041000000000010043f0000004101000039000000040010043f000001a801000041000005ea000104300000000002120049000001cc0020009c0000058e0000213d0000001f0020008c0000058e0000a13d0000000001010433000000000001004b0000000002000039000000010200c039000000000021004b0000058e0000c13d000000000001042d0000000001000019000005ea00010430000000000100041a0000017e021001970000000001000411000000000012004b000005960000c13d000000000001042d000001a702000041000000000020043f000000040010043f000001a801000041000005ea00010430000001b90010009c000005a20000213d000000000002004b000005a20000613d000001ba011000d100000000012100d9000000000001042d000001c201000041000000000010043f000001bc01000041000005ea00010430000000000002004b000005ab0000613d000001cd03200129000000000013004b000005ae0000413d00000000011200a9000001ba0110012a000000000001042d000001bb01000041000000000010043f000001bc01000041000005ea00010430000000000001042f00000000010004140000017b0010009c0000017b01008041000000c001100210000001ab011001c7000080100200003905e805e30000040f0000000100200190000005be0000613d000000000101043b000000000001042d0000000001000019000005ea0001043000000000050100190000000000200443000000050030008c000005ce0000413d000000040100003900000000020000190000000506200210000000000664001900000005066002700000000006060031000000000161043a0000000102200039000000000031004b000005c60000413d0000017b0030009c0000017b03008041000000600130021000000000020004140000017b0020009c0000017b02008041000000c002200210000000000112019f000001ce011001c7000000000205001905e805e30000040f0000000100200190000005dd0000613d000000000101043b000000000001042d000000000001042f000005e1002104210000000102000039000000000001042d0000000002000019000000000001042d000005e6002104230000000102000039000000000001042d0000000002000019000000000001042d000005e800000432000005e90001042e000005ea00010430000000000000000000000000000000000000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000001ffffffe000000000000000000000000000000000000000000000000000000000ffffffe0000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000008be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0796b89b91644bc98cd93958e4c9038275d622183e25ac5af08cc6b5d9553913202000002000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000878678326eac90000000000002000000000000000000000000000000c0000001000000000000000000771b41b7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000e6c4247b0000000000000000000000000000000000000000000000000000000081bf7f6700000000000000000000000000000000000000000000000000000000310ab089e4439a4c15d089f94afb7896ff553aecb10793d0ab882de59d99a32e020000020000000000000000000000000000004400000000000000000000000000000000000000000000000000000000000000000000000000000000715018a500000000000000000000000000000000000000000000000000000000b6b55f2400000000000000000000000000000000000000000000000000000000da40ef7f00000000000000000000000000000000000000000000000000000000da40ef8000000000000000000000000000000000000000000000000000000000f2fde38b00000000000000000000000000000000000000000000000000000000fada51e600000000000000000000000000000000000000000000000000000000b6b55f2500000000000000000000000000000000000000000000000000000000d59624b4000000000000000000000000000000000000000000000000000000007d882096000000000000000000000000000000000000000000000000000000007d882097000000000000000000000000000000000000000000000000000000008da5cb5b000000000000000000000000000000000000000000000000000000009ec5a89400000000000000000000000000000000000000000000000000000000715018a600000000000000000000000000000000000000000000000000000000763265de000000000000000000000000000000000000000000000000000000004e71d92c000000000000000000000000000000000000000000000000000000005a5cced5000000000000000000000000000000000000000000000000000000005a5cced6000000000000000000000000000000000000000000000000000000005d4954110000000000000000000000000000000000000000000000000000000065a64668000000000000000000000000000000000000000000000000000000004e71d92d0000000000000000000000000000000000000000000000000000000058950c220000000000000000000000000000000000000000000000000000000023548b8a0000000000000000000000000000000000000000000000000000000023548b8b000000000000000000000000000000000000000000000000000000003b7fcdca0000000000000000000000000000000000000000000000000000000000c35fc1000000000000000000000000000000000000000000000000000000000ba36dcd0000000000000000000000000000000000000020000000800000000000000000118cdaa70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000001e4fbdf7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000020000000000000000000000000000000000004000000000000000000000000023b872dd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffa91e0c3165215fe453f5bf3de083d5fd6c4e62c491849155a042a647588c53a0c2c77a0e00000000000000000000000000000000000000000000000000000000f10b176b00000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000002000000000000000000000000064472098d02cd057225435ec65ba18eee60efbd1b9af56f1f4c37a89974edda0cadd5a68000000000000000000000000000000000000000000000000000000008d2cb89d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000008000000000000000006e72b45e00000000000000000000000000000000000000000000000000000000646cf558000000000000000000000000000000000000000000000000000000000000000000000012725dd1d243aba0e75fe645cc4873f9e65afe688c928e1f210000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000bac65e5b00000000000000000000000000000000000000040000001c00000000000000000000000000000000000000000000000000000000000000000de0b6b3a763ffff00000000000000000000000000000000000000000000000000000003ffffffe0a9059cbb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000007c5f487dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec39809cc7f708afc65944829bd487b90b72536b1951864fbfc14e125fc972a6507f390200000200000000000000000000000000000024000000000000000000000000750b219c0000000000000000000000000000000000000000000000000000000070a08231000000000000000000000000000000000000000000000000000000004e487b71000000000000000000000000000000000000000000000000000000006fed7d8500000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff020000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a8b5e2c3d3b1780426aa7bca0e70b7df836afe48d7fb9a6802547e317440f36
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000680b9560000000000000000000000000000000000000000000000fe1c215e8f838e00000000000000000000000000000df70075737e9f96b078ab4461eee3e055e061223
-----Decoded View---------------
Arg [0] : _maturityDate (uint256): 1745589600
Arg [1] : _maxCap (uint256): 75000000000000000000000
Arg [2] : _bigcoin (address): 0xDf70075737E9F96B078ab4461EeE3e055E061223
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000680b9560
Arg [1] : 000000000000000000000000000000000000000000000fe1c215e8f838e00000
Arg [2] : 000000000000000000000000df70075737e9f96b078ab4461eee3e055e061223
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.