Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| 0x61018060 | 22189012 | 316 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
DssSpell
Compiler Version
v0.8.16+commit.07a7930e
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2025-04-03
*/
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity <0.9.0 =0.8.16 >=0.5.12 >=0.6.0 >=0.6.2 >=0.8.0 ^0.8.16;
pragma experimental ABIEncoderV2;
// lib/dss-exec-lib/src/CollateralOpts.sol
//
// CollateralOpts.sol -- Data structure for onboarding collateral
//
// Copyright (C) 2020-2022 Dai Foundation
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
struct CollateralOpts {
bytes32 ilk;
address gem;
address join;
address clip;
address calc;
address pip;
bool isLiquidatable;
bool isOSM;
bool whitelistOSM;
uint256 ilkDebtCeiling;
uint256 minVaultAmount;
uint256 maxLiquidationAmount;
uint256 liquidationPenalty;
uint256 ilkStabilityFee;
uint256 startingPriceFactor;
uint256 breakerTolerance;
uint256 auctionDuration;
uint256 permittedDrop;
uint256 liquidationRatio;
uint256 kprFlatReward;
uint256 kprPctReward;
}
// lib/dss-exec-lib/src/DssExec.sol
//
// DssExec.sol -- MakerDAO Executive Spell Template
//
// Copyright (C) 2020-2022 Dai Foundation
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
interface PauseAbstract {
function delay() external view returns (uint256);
function plot(address, bytes32, bytes calldata, uint256) external;
function exec(address, bytes32, bytes calldata, uint256) external returns (bytes memory);
}
interface Changelog {
function getAddress(bytes32) external view returns (address);
}
interface SpellAction {
function officeHours() external view returns (bool);
function description() external view returns (string memory);
function nextCastTime(uint256) external view returns (uint256);
}
contract DssExec {
Changelog constant public log = Changelog(0xdA0Ab1e0017DEbCd72Be8599041a2aa3bA7e740F);
uint256 public eta;
bytes public sig;
bool public done;
bytes32 immutable public tag;
address immutable public action;
uint256 immutable public expiration;
PauseAbstract immutable public pause;
// Provides a descriptive tag for bot consumption
// This should be modified weekly to provide a summary of the actions
// Hash: seth keccak -- "$(wget https://<executive-vote-canonical-post> -q -O - 2>/dev/null)"
function description() external view returns (string memory) {
return SpellAction(action).description();
}
function officeHours() external view returns (bool) {
return SpellAction(action).officeHours();
}
function nextCastTime() external view returns (uint256 castTime) {
return SpellAction(action).nextCastTime(eta);
}
// @param _description A string description of the spell
// @param _expiration The timestamp this spell will expire. (Ex. block.timestamp + 30 days)
// @param _spellAction The address of the spell action
constructor(uint256 _expiration, address _spellAction) {
pause = PauseAbstract(log.getAddress("MCD_PAUSE"));
expiration = _expiration;
action = _spellAction;
sig = abi.encodeWithSignature("execute()");
bytes32 _tag; // Required for assembly access
address _action = _spellAction; // Required for assembly access
assembly { _tag := extcodehash(_action) }
tag = _tag;
}
function schedule() public {
require(block.timestamp <= expiration, "This contract has expired");
require(eta == 0, "This spell has already been scheduled");
eta = block.timestamp + PauseAbstract(pause).delay();
pause.plot(action, tag, sig, eta);
}
function cast() public {
require(!done, "spell-already-cast");
done = true;
pause.exec(action, tag, sig, eta);
}
}
// lib/dss-test/lib/dss-interfaces/src/ERC/GemAbstract.sol
// A base ERC-20 abstract class
// https://eips.ethereum.org/EIPS/eip-20
interface GemAbstract {
function totalSupply() external view returns (uint256);
function balanceOf(address) external view returns (uint256);
function allowance(address, address) external view returns (uint256);
function approve(address, uint256) external returns (bool);
function transfer(address, uint256) external returns (bool);
function transferFrom(address, address, uint256) external returns (bool);
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
// lib/dss-test/lib/dss-interfaces/src/dapp/DSAuthorityAbstract.sol
// https://github.com/dapphub/ds-auth
interface DSAuthorityAbstract {
function canCall(address, address, bytes4) external view returns (bool);
}
interface DSAuthAbstract {
function authority() external view returns (address);
function owner() external view returns (address);
function setOwner(address) external;
function setAuthority(address) external;
}
// lib/dss-test/lib/dss-interfaces/src/dapp/DSChiefAbstract.sol
// https://github.com/dapphub/ds-chief
interface DSChiefAbstract {
function live() external view returns (uint256);
function launch() external;
function slates(bytes32) external view returns (address[] memory);
function votes(address) external view returns (bytes32);
function approvals(address) external view returns (uint256);
function deposits(address) external view returns (address);
function GOV() external view returns (address);
function IOU() external view returns (address);
function hat() external view returns (address);
function MAX_YAYS() external view returns (uint256);
function lock(uint256) external;
function free(uint256) external;
function etch(address[] calldata) external returns (bytes32);
function vote(address[] calldata) external returns (bytes32);
function vote(bytes32) external;
function lift(address) external;
function setOwner(address) external;
function setAuthority(address) external;
function isUserRoot(address) external view returns (bool);
function setRootUser(address, bool) external;
function _root_users(address) external view returns (bool);
function _user_roles(address) external view returns (bytes32);
function _capability_roles(address, bytes4) external view returns (bytes32);
function _public_capabilities(address, bytes4) external view returns (bool);
function getUserRoles(address) external view returns (bytes32);
function getCapabilityRoles(address, bytes4) external view returns (bytes32);
function isCapabilityPublic(address, bytes4) external view returns (bool);
function hasUserRole(address, uint8) external view returns (bool);
function canCall(address, address, bytes4) external view returns (bool);
function setUserRole(address, uint8, bool) external;
function setPublicCapability(address, bytes4, bool) external;
function setRoleCapability(uint8, address, bytes4, bool) external;
}
interface DSChiefFabAbstract {
function newChief(address, uint256) external returns (address);
}
// lib/dss-test/lib/dss-interfaces/src/dapp/DSPauseAbstract.sol
// https://github.com/dapphub/ds-pause
interface DSPauseAbstract {
function owner() external view returns (address);
function authority() external view returns (address);
function setOwner(address) external;
function setAuthority(address) external;
function setDelay(uint256) external;
function plans(bytes32) external view returns (bool);
function proxy() external view returns (address);
function delay() external view returns (uint256);
function plot(address, bytes32, bytes calldata, uint256) external;
function drop(address, bytes32, bytes calldata, uint256) external;
function exec(address, bytes32, bytes calldata, uint256) external returns (bytes memory);
}
// lib/dss-test/lib/dss-interfaces/src/dapp/DSPauseProxyAbstract.sol
// https://github.com/dapphub/ds-pause
interface DSPauseProxyAbstract {
function owner() external view returns (address);
function exec(address, bytes calldata) external returns (bytes memory);
}
// lib/dss-test/lib/dss-interfaces/src/dapp/DSRolesAbstract.sol
// https://github.com/dapphub/ds-roles
interface DSRolesAbstract {
function _root_users(address) external view returns (bool);
function _user_roles(address) external view returns (bytes32);
function _capability_roles(address, bytes4) external view returns (bytes32);
function _public_capabilities(address, bytes4) external view returns (bool);
function getUserRoles(address) external view returns (bytes32);
function getCapabilityRoles(address, bytes4) external view returns (bytes32);
function isUserRoot(address) external view returns (bool);
function isCapabilityPublic(address, bytes4) external view returns (bool);
function hasUserRole(address, uint8) external view returns (bool);
function canCall(address, address, bytes4) external view returns (bool);
function setRootUser(address, bool) external;
function setUserRole(address, uint8, bool) external;
function setPublicCapability(address, bytes4, bool) external;
function setRoleCapability(uint8, address, bytes4, bool) external;
function authority() external view returns (address);
function owner() external view returns (address);
function setOwner(address) external;
function setAuthority(address) external;
}
// lib/dss-test/lib/dss-interfaces/src/dapp/DSRuneAbstract.sol
// Copyright (C) 2020 Maker Foundation
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
// https://github.com/makerdao/dss-spellbook
interface DSRuneAbstract {
// @return [address] A contract address conforming to DSPauseAbstract
function pause() external view returns (address);
// @return [address] The address of the contract to be executed
// TODO: is `action()` a required field? Not all spells rely on a seconary contract.
function action() external view returns (address);
// @return [bytes32] extcodehash of rune address
function tag() external view returns (bytes32);
// @return [bytes] The `abi.encodeWithSignature()` result of the function to be called.
function sig() external view returns (bytes memory);
// @return [uint256] Earliest time rune can execute
function eta() external view returns (uint256);
// The schedule() function plots the rune in the DSPause
function schedule() external;
// @return [bool] true if the rune has been cast()
function done() external view returns (bool);
// The cast() function executes the rune
function cast() external;
}
// lib/dss-test/lib/dss-interfaces/src/dapp/DSSpellAbstract.sol
// https://github.com/dapphub/ds-spell
interface DSSpellAbstract {
function whom() external view returns (address);
function mana() external view returns (uint256);
function data() external view returns (bytes memory);
function done() external view returns (bool);
function cast() external;
}
// lib/dss-test/lib/dss-interfaces/src/dapp/DSThingAbstract.sol
// https://github.com/dapphub/ds-thing
interface DSThingAbstract {
function authority() external view returns (address);
function owner() external view returns (address);
function setOwner(address) external;
function setAuthority(address) external;
}
// lib/dss-test/lib/dss-interfaces/src/dapp/DSTokenAbstract.sol
// https://github.com/dapphub/ds-token/blob/master/src/token.sol
interface DSTokenAbstract {
function name() external view returns (bytes32);
function symbol() external view returns (bytes32);
function decimals() external view returns (uint256);
function totalSupply() external view returns (uint256);
function balanceOf(address) external view returns (uint256);
function transfer(address, uint256) external returns (bool);
function allowance(address, address) external view returns (uint256);
function approve(address, uint256) external returns (bool);
function approve(address) external returns (bool);
function transferFrom(address, address, uint256) external returns (bool);
function push(address, uint256) external;
function pull(address, uint256) external;
function move(address, address, uint256) external;
function mint(uint256) external;
function mint(address,uint) external;
function burn(uint256) external;
function burn(address,uint) external;
function setName(bytes32) external;
function authority() external view returns (address);
function owner() external view returns (address);
function setOwner(address) external;
function setAuthority(address) external;
}
// lib/dss-test/lib/dss-interfaces/src/dapp/DSValueAbstract.sol
// https://github.com/dapphub/ds-value/blob/master/src/value.sol
interface DSValueAbstract {
function has() external view returns (bool);
function val() external view returns (bytes32);
function peek() external view returns (bytes32, bool);
function read() external view returns (bytes32);
function poke(bytes32) external;
function void() external;
function authority() external view returns (address);
function owner() external view returns (address);
function setOwner(address) external;
function setAuthority(address) external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/AuthGemJoinAbstract.sol
// https://github.com/makerdao/dss-deploy/blob/master/src/join.sol
interface AuthGemJoinAbstract {
function vat() external view returns (address);
function ilk() external view returns (bytes32);
function gem() external view returns (address);
function dec() external view returns (uint256);
function live() external view returns (uint256);
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function cage() external;
function join(address, uint256) external;
function exit(address, uint256) external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/CatAbstract.sol
// https://github.com/makerdao/dss/blob/master/src/cat.sol
interface CatAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function box() external view returns (uint256);
function litter() external view returns (uint256);
function ilks(bytes32) external view returns (address, uint256, uint256);
function live() external view returns (uint256);
function vat() external view returns (address);
function vow() external view returns (address);
function file(bytes32, address) external;
function file(bytes32, uint256) external;
function file(bytes32, bytes32, uint256) external;
function file(bytes32, bytes32, address) external;
function bite(bytes32, address) external returns (uint256);
function claw(uint256) external;
function cage() external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/ChainlogAbstract.sol
// https://github.com/makerdao/dss-chain-log
interface ChainlogAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function keys() external view returns (bytes32[] memory);
function version() external view returns (string memory);
function ipfs() external view returns (string memory);
function setVersion(string calldata) external;
function setSha256sum(string calldata) external;
function setIPFS(string calldata) external;
function setAddress(bytes32,address) external;
function removeAddress(bytes32) external;
function count() external view returns (uint256);
function get(uint256) external view returns (bytes32,address);
function list() external view returns (bytes32[] memory);
function getAddress(bytes32) external view returns (address);
}
// Helper function for returning address or abstract of Chainlog
// Valid on Mainnet, Kovan, Rinkeby, Ropsten, and Goerli
contract ChainlogHelper {
address public constant ADDRESS = 0xdA0Ab1e0017DEbCd72Be8599041a2aa3bA7e740F;
ChainlogAbstract public constant ABSTRACT = ChainlogAbstract(ADDRESS);
}
// lib/dss-test/lib/dss-interfaces/src/dss/ClipAbstract.sol
/// ClipAbstract.sol -- Clip Interface
// Copyright (C) 2021 Maker Ecosystem Growth Holdings, INC.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
interface ClipAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function ilk() external view returns (bytes32);
function vat() external view returns (address);
function dog() external view returns (address);
function vow() external view returns (address);
function spotter() external view returns (address);
function calc() external view returns (address);
function buf() external view returns (uint256);
function tail() external view returns (uint256);
function cusp() external view returns (uint256);
function chip() external view returns (uint64);
function tip() external view returns (uint192);
function chost() external view returns (uint256);
function kicks() external view returns (uint256);
function active(uint256) external view returns (uint256);
function sales(uint256) external view returns (uint256,uint256,uint256,address,uint96,uint256);
function stopped() external view returns (uint256);
function file(bytes32,uint256) external;
function file(bytes32,address) external;
function kick(uint256,uint256,address,address) external returns (uint256);
function redo(uint256,address) external;
function take(uint256,uint256,uint256,address,bytes calldata) external;
function count() external view returns (uint256);
function list() external view returns (uint256[] memory);
function getStatus(uint256) external view returns (bool,uint256,uint256,uint256);
function upchost() external;
function yank(uint256) external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/ClipperMomAbstract.sol
// https://github.com/makerdao/Clipper-mom/blob/master/src/ClipperMom.sol
interface ClipperMomAbstract {
function owner() external view returns (address);
function authority() external view returns (address);
function locked(address) external view returns (uint256);
function tolerance(address) external view returns (uint256);
function spotter() external view returns (address);
function setOwner(address) external;
function setAuthority(address) external;
function setPriceTolerance(address, uint256) external;
function setBreaker(address, uint256, uint256) external;
function tripBreaker(address) external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/CureAbstract.sol
// https://github.com/makerdao/dss/blob/master/src/cure.sol
interface CureAbstract {
function wards(address) external view returns (uint256);
function live() external view returns (uint256);
function srcs(uint256) external view returns (address);
function wait() external view returns (uint256);
function when() external view returns (uint256);
function pos(address) external view returns (uint256);
function amt(address) external view returns (uint256);
function loadded(address) external view returns (uint256);
function lCount() external view returns (uint256);
function say() external view returns (uint256);
function tCount() external view returns (uint256);
function list() external view returns (address[] memory);
function tell() external view returns (uint256);
function rely(address) external;
function deny(address) external;
function file(bytes32, uint256) external;
function lift(address) external;
function drop(address) external;
function cage() external;
function load(address) external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/DaiAbstract.sol
// https://github.com/makerdao/dss/blob/master/src/dai.sol
interface DaiAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function version() external view returns (string memory);
function decimals() external view returns (uint8);
function totalSupply() external view returns (uint256);
function balanceOf(address) external view returns (uint256);
function allowance(address, address) external view returns (uint256);
function nonces(address) external view returns (uint256);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external view returns (bytes32);
function transfer(address, uint256) external returns (bool);
function transferFrom(address, address, uint256) external returns (bool);
function mint(address, uint256) external;
function burn(address, uint256) external;
function approve(address, uint256) external returns (bool);
function push(address, uint256) external;
function pull(address, uint256) external;
function move(address, address, uint256) external;
function permit(address, address, uint256, uint256, bool, uint8, bytes32, bytes32) external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/DaiJoinAbstract.sol
// https://github.com/makerdao/dss/blob/master/src/join.sol
interface DaiJoinAbstract {
function wards(address) external view returns (uint256);
function rely(address usr) external;
function deny(address usr) external;
function vat() external view returns (address);
function dai() external view returns (address);
function live() external view returns (uint256);
function cage() external;
function join(address, uint256) external;
function exit(address, uint256) external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/DogAbstract.sol
/// DogAbstract.sol -- Dog Interface
// Copyright (C) 2021 Maker Ecosystem Growth Holdings, INC.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
interface DogAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function vat() external view returns (address);
function ilks(bytes32) external view returns (address,uint256,uint256,uint256);
function vow() external view returns (address);
function live() external view returns (uint256);
function Hole() external view returns (uint256);
function Dirt() external view returns (uint256);
function file(bytes32,address) external;
function file(bytes32,uint256) external;
function file(bytes32,bytes32,uint256) external;
function file(bytes32,bytes32,address) external;
function chop(bytes32) external view returns (uint256);
function bark(bytes32,address,address) external returns (uint256);
function digs(bytes32,uint256) external;
function cage() external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/DssAutoLineAbstract.sol
// https://github.com/makerdao/dss-auto-line/blob/master/src/DssAutoLine.sol
interface DssAutoLineAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function vat() external view returns (address);
function ilks(bytes32) external view returns (uint256,uint256,uint48,uint48,uint48);
function setIlk(bytes32,uint256,uint256,uint256) external;
function remIlk(bytes32) external;
function exec(bytes32) external returns (uint256);
}
// lib/dss-test/lib/dss-interfaces/src/dss/DssCdpManager.sol
// https://github.com/makerdao/dss-cdp-manager/
interface DssCdpManagerAbstract {
function vat() external view returns (address);
function cdpi() external view returns (uint256);
function urns(uint256) external view returns (address);
function list(uint256) external view returns (uint256,uint256);
function owns(uint256) external view returns (address);
function ilks(uint256) external view returns (bytes32);
function first(address) external view returns (uint256);
function last(address) external view returns (uint256);
function count(address) external view returns (uint256);
function cdpCan(address, uint256, address) external returns (uint256);
function urnCan(address, address) external returns (uint256);
function cdpAllow(uint256, address, uint256) external;
function urnAllow(address, uint256) external;
function open(bytes32, address) external returns (uint256);
function give(uint256, address) external;
function frob(uint256, int256, int256) external;
function flux(uint256, address, uint256) external;
function flux(bytes32, uint256, address, uint256) external;
function move(uint256, address, uint256) external;
function quit(uint256, address) external;
function enter(address, uint256) external;
function shift(uint256, uint256) external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/ESMAbstract.sol
// https://github.com/makerdao/esm/blob/master/src/ESM.sol
interface ESMAbstract {
function gem() external view returns (address);
function proxy() external view returns (address);
function wards(address) external view returns (uint256);
function sum(address) external view returns (address);
function Sum() external view returns (uint256);
function min() external view returns (uint256);
function end() external view returns (address);
function live() external view returns (uint256);
function revokesGovernanceAccess() external view returns (bool);
function rely(address) external;
function deny(address) external;
function file(bytes32, uint256) external;
function file(bytes32, address) external;
function cage() external;
function fire() external;
function denyProxy(address) external;
function join(uint256) external;
function burn() external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/ETHJoinAbstract.sol
// https://github.com/makerdao/dss/blob/master/src/join.sol
interface ETHJoinAbstract {
function wards(address) external view returns (uint256);
function rely(address usr) external;
function deny(address usr) external;
function vat() external view returns (address);
function ilk() external view returns (bytes32);
function live() external view returns (uint256);
function cage() external;
function join(address) external payable;
function exit(address, uint256) external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/EndAbstract.sol
// https://github.com/makerdao/dss/blob/master/src/end.sol
interface EndAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function vat() external view returns (address);
function cat() external view returns (address);
function dog() external view returns (address);
function vow() external view returns (address);
function pot() external view returns (address);
function spot() external view returns (address);
function cure() external view returns (address);
function live() external view returns (uint256);
function when() external view returns (uint256);
function wait() external view returns (uint256);
function debt() external view returns (uint256);
function tag(bytes32) external view returns (uint256);
function gap(bytes32) external view returns (uint256);
function Art(bytes32) external view returns (uint256);
function fix(bytes32) external view returns (uint256);
function bag(address) external view returns (uint256);
function out(bytes32, address) external view returns (uint256);
function file(bytes32, address) external;
function file(bytes32, uint256) external;
function cage() external;
function cage(bytes32) external;
function skip(bytes32, uint256) external;
function snip(bytes32, uint256) external;
function skim(bytes32, address) external;
function free(bytes32) external;
function thaw() external;
function flow(bytes32) external;
function pack(uint256) external;
function cash(bytes32, uint256) external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/ExponentialDecreaseAbstract.sol
/// ExponentialDecreaseAbstract.sol -- Exponential Decrease Interface
// Copyright (C) 2021 Maker Ecosystem Growth Holdings, INC.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
interface ExponentialDecreaseAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function cut() external view returns (uint256);
function file(bytes32,uint256) external;
function price(uint256,uint256) external view returns (uint256);
}
// lib/dss-test/lib/dss-interfaces/src/dss/FaucetAbstract.sol
// https://github.com/makerdao/token-faucet/blob/master/src/RestrictedTokenFaucet.sol
interface FaucetAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function list(address) external view returns (uint256);
function hope(address) external;
function nope(address) external;
function amt(address) external view returns (uint256);
function done(address, address) external view returns (bool);
function gulp(address) external;
function gulp(address, address[] calldata) external;
function shut(address) external;
function undo(address, address) external;
function setAmt(address, uint256) external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/FlapAbstract.sol
// https://github.com/makerdao/dss/blob/master/src/flap.sol
interface FlapAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function bids(uint256) external view returns (uint256, uint256, address, uint48, uint48);
function vat() external view returns (address);
function gem() external view returns (address);
function beg() external view returns (uint256);
function ttl() external view returns (uint48);
function tau() external view returns (uint48);
function kicks() external view returns (uint256);
function live() external view returns (uint256);
function lid() external view returns (uint256);
function fill() external view returns (uint256);
function file(bytes32, uint256) external;
function kick(uint256, uint256) external returns (uint256);
function tick(uint256) external;
function tend(uint256, uint256, uint256) external;
function deal(uint256) external;
function cage(uint256) external;
function yank(uint256) external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/FlashAbstract.sol
// https://github.com/makerdao/dss-flash/blob/master/src/flash.sol
interface FlashAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function vat() external view returns (address);
function daiJoin() external view returns (address);
function dai() external view returns (address);
function vow() external view returns (address);
function max() external view returns (uint256);
function toll() external view returns (uint256);
function CALLBACK_SUCCESS() external view returns (bytes32);
function CALLBACK_SUCCESS_VAT_DAI() external view returns (bytes32);
function file(bytes32, uint256) external;
function maxFlashLoan(address) external view returns (uint256);
function flashFee(address, uint256) external view returns (uint256);
function flashLoan(address, address, uint256, bytes calldata) external returns (bool);
function vatDaiFlashLoan(address, uint256, bytes calldata) external returns (bool);
function convert() external;
function accrue() external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/FlipAbstract.sol
// https://github.com/makerdao/dss/blob/master/src/flip.sol
interface FlipAbstract {
function wards(address) external view returns (uint256);
function rely(address usr) external;
function deny(address usr) external;
function bids(uint256) external view returns (uint256, uint256, address, uint48, uint48, address, address, uint256);
function vat() external view returns (address);
function cat() external view returns (address);
function ilk() external view returns (bytes32);
function beg() external view returns (uint256);
function ttl() external view returns (uint48);
function tau() external view returns (uint48);
function kicks() external view returns (uint256);
function file(bytes32, uint256) external;
function kick(address, address, uint256, uint256, uint256) external returns (uint256);
function tick(uint256) external;
function tend(uint256, uint256, uint256) external;
function dent(uint256, uint256, uint256) external;
function deal(uint256) external;
function yank(uint256) external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/FlipperMomAbstract.sol
// https://github.com/makerdao/flipper-mom/blob/master/src/FlipperMom.sol
interface FlipperMomAbstract {
function owner() external view returns (address);
function authority() external view returns (address);
function setOwner(address) external;
function setAuthority(address) external;
function cat() external returns (address);
function rely(address) external;
function deny(address) external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/FlopAbstract.sol
// https://github.com/makerdao/dss/blob/master/src/flop.sol
interface FlopAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function bids(uint256) external view returns (uint256, uint256, address, uint48, uint48);
function vat() external view returns (address);
function gem() external view returns (address);
function beg() external view returns (uint256);
function pad() external view returns (uint256);
function ttl() external view returns (uint48);
function tau() external view returns (uint48);
function kicks() external view returns (uint256);
function live() external view returns (uint256);
function vow() external view returns (address);
function file(bytes32, uint256) external;
function kick(address, uint256, uint256) external returns (uint256);
function tick(uint256) external;
function dent(uint256, uint256, uint256) external;
function deal(uint256) external;
function cage() external;
function yank(uint256) external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/GemJoinAbstract.sol
// https://github.com/makerdao/dss/blob/master/src/join.sol
interface GemJoinAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function vat() external view returns (address);
function ilk() external view returns (bytes32);
function gem() external view returns (address);
function dec() external view returns (uint256);
function live() external view returns (uint256);
function cage() external;
function join(address, uint256) external;
function exit(address, uint256) external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/GemJoinImplementationAbstract.sol
// https://github.com/makerdao/dss-deploy/blob/master/src/join.sol
interface GemJoinImplementationAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function vat() external view returns (address);
function ilk() external view returns (bytes32);
function gem() external view returns (address);
function dec() external view returns (uint256);
function live() external view returns (uint256);
function cage() external;
function join(address, uint256) external;
function exit(address, uint256) external;
function setImplementation(address, uint256) external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/GemJoinManagedAbstract.sol
// https://github.com/makerdao/dss-gem-joins/blob/master/src/join-managed.sol
interface GemJoinManagedAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function vat() external view returns (address);
function ilk() external view returns (bytes32);
function gem() external view returns (address);
function dec() external view returns (uint256);
function live() external view returns (uint256);
function cage() external;
function join(address, uint256) external;
function exit(address, address, uint256) external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/GetCdpsAbstract.sol
// https://github.com/makerdao/dss-cdp-manager/blob/master/src/GetCdps.sol
interface GetCdpsAbstract {
function getCdpsAsc(address, address) external view returns (uint256[] memory, address[] memory, bytes32[] memory);
function getCdpsDesc(address, address) external view returns (uint256[] memory, address[] memory, bytes32[] memory);
}
// lib/dss-test/lib/dss-interfaces/src/dss/IlkRegistryAbstract.sol
// https://github.com/makerdao/ilk-registry
interface IlkRegistryAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function vat() external view returns (address);
function dog() external view returns (address);
function cat() external view returns (address);
function spot() external view returns (address);
function ilkData(bytes32) external view returns (
uint96, address, address, uint8, uint96, address, address, string memory, string memory
);
function ilks() external view returns (bytes32[] memory);
function ilks(uint) external view returns (bytes32);
function add(address) external;
function remove(bytes32) external;
function update(bytes32) external;
function removeAuth(bytes32) external;
function file(bytes32, address) external;
function file(bytes32, bytes32, address) external;
function file(bytes32, bytes32, uint256) external;
function file(bytes32, bytes32, string calldata) external;
function count() external view returns (uint256);
function list() external view returns (bytes32[] memory);
function list(uint256, uint256) external view returns (bytes32[] memory);
function get(uint256) external view returns (bytes32);
function info(bytes32) external view returns (
string memory, string memory, uint256, uint256, address, address, address, address
);
function pos(bytes32) external view returns (uint256);
function class(bytes32) external view returns (uint256);
function gem(bytes32) external view returns (address);
function pip(bytes32) external view returns (address);
function join(bytes32) external view returns (address);
function xlip(bytes32) external view returns (address);
function dec(bytes32) external view returns (uint256);
function symbol(bytes32) external view returns (string memory);
function name(bytes32) external view returns (string memory);
function put(bytes32, address, address, uint256, uint256, address, address, string calldata, string calldata) external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/JugAbstract.sol
// https://github.com/makerdao/dss/blob/master/src/jug.sol
interface JugAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function ilks(bytes32) external view returns (uint256, uint256);
function vat() external view returns (address);
function vow() external view returns (address);
function base() external view returns (uint256);
function init(bytes32) external;
function file(bytes32, bytes32, uint256) external;
function file(bytes32, uint256) external;
function file(bytes32, address) external;
function drip(bytes32) external returns (uint256);
}
// lib/dss-test/lib/dss-interfaces/src/dss/LPOsmAbstract.sol
// https://github.com/makerdao/univ2-lp-oracle
interface LPOsmAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function stopped() external view returns (uint256);
function bud(address) external view returns (uint256);
function dec0() external view returns (uint8);
function dec1() external view returns (uint8);
function orb0() external view returns (address);
function orb1() external view returns (address);
function wat() external view returns (bytes32);
function hop() external view returns (uint32);
function src() external view returns (address);
function zzz() external view returns (uint64);
function change(address) external;
function step(uint256) external;
function stop() external;
function start() external;
function pass() external view returns (bool);
function poke() external;
function peek() external view returns (bytes32, bool);
function peep() external view returns (bytes32, bool);
function read() external view returns (bytes32);
function kiss(address) external;
function diss(address) external;
function kiss(address[] calldata) external;
function diss(address[] calldata) external;
function link(uint256, address) external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/LerpAbstract.sol
// https://github.com/makerdao/dss-lerp/blob/master/src/Lerp.sol
interface LerpAbstract {
function target() external view returns (address);
function what() external view returns (bytes32);
function start() external view returns (uint256);
function end() external view returns (uint256);
function duration() external view returns (uint256);
function done() external view returns (bool);
function startTime() external view returns (uint256);
function tick() external returns (uint256);
function ilk() external view returns (bytes32);
}
// lib/dss-test/lib/dss-interfaces/src/dss/LerpFactoryAbstract.sol
// https://github.com/makerdao/dss-lerp/blob/master/src/LerpFactory.sol
interface LerpFactoryAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function lerps(bytes32) external view returns (address);
function active(uint256) external view returns (address);
function newLerp(bytes32, address, bytes32, uint256, uint256, uint256, uint256) external returns (address);
function newIlkLerp(bytes32, address, bytes32, bytes32, uint256, uint256, uint256, uint256) external returns (address);
function tall() external;
function count() external view returns (uint256);
function list() external view returns (address[] memory);
}
// lib/dss-test/lib/dss-interfaces/src/dss/LinearDecreaseAbstract.sol
/// LinearDecreaseAbstract.sol -- Linear Decrease Interface
// Copyright (C) 2021 Maker Ecosystem Growth Holdings, INC.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
interface LinearDecreaseAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function tau() external view returns (uint256);
function file(bytes32,uint256) external;
function price(uint256,uint256) external view returns (uint256);
}
// lib/dss-test/lib/dss-interfaces/src/dss/MedianAbstract.sol
// https://github.com/makerdao/median
interface MedianAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function age() external view returns (uint32);
function wat() external view returns (bytes32);
function bar() external view returns (uint256);
function orcl(address) external view returns (uint256);
function bud(address) external view returns (uint256);
function slot(uint8) external view returns (address);
function read() external view returns (uint256);
function peek() external view returns (uint256, bool);
function lift(address[] calldata) external;
function drop(address[] calldata) external;
function setBar(uint256) external;
function kiss(address) external;
function diss(address) external;
function kiss(address[] calldata) external;
function diss(address[] calldata) external;
function poke(uint256[] calldata, uint256[] calldata, uint8[] calldata, bytes32[] calldata, bytes32[] calldata) external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/MkrAuthorityAbstract.sol
// https://github.com/makerdao/mkr-authority/blob/master/src/MkrAuthority.sol
interface MkrAuthorityAbstract {
function root() external returns (address);
function setRoot(address) external;
function wards(address) external returns (uint256);
function rely(address) external;
function deny(address) external;
function canCall(address, address, bytes4) external returns (bool);
}
// lib/dss-test/lib/dss-interfaces/src/dss/OsmAbstract.sol
// https://github.com/makerdao/osm
interface OsmAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function stopped() external view returns (uint256);
function src() external view returns (address);
function hop() external view returns (uint16);
function zzz() external view returns (uint64);
function bud(address) external view returns (uint256);
function stop() external;
function start() external;
function change(address) external;
function step(uint16) external;
function void() external;
function pass() external view returns (bool);
function poke() external;
function peek() external view returns (bytes32, bool);
function peep() external view returns (bytes32, bool);
function read() external view returns (bytes32);
function kiss(address) external;
function diss(address) external;
function kiss(address[] calldata) external;
function diss(address[] calldata) external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/OsmMomAbstract.sol
// https://github.com/makerdao/osm-mom
interface OsmMomAbstract {
function owner() external view returns (address);
function authority() external view returns (address);
function osms(bytes32) external view returns (address);
function setOsm(bytes32, address) external;
function setOwner(address) external;
function setAuthority(address) external;
function stop(bytes32) external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/PotAbstract.sol
// https://github.com/makerdao/dss/blob/master/src/pot.sol
interface PotAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function pie(address) external view returns (uint256);
function Pie() external view returns (uint256);
function dsr() external view returns (uint256);
function chi() external view returns (uint256);
function vat() external view returns (address);
function vow() external view returns (address);
function rho() external view returns (uint256);
function live() external view returns (uint256);
function file(bytes32, uint256) external;
function file(bytes32, address) external;
function cage() external;
function drip() external returns (uint256);
function join(uint256) external;
function exit(uint256) external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/PsmAbstract.sol
// https://github.com/makerdao/dss-psm/blob/master/src/psm.sol
interface PsmAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function vat() external view returns (address);
function gemJoin() external view returns (address);
function dai() external view returns (address);
function daiJoin() external view returns (address);
function ilk() external view returns (bytes32);
function vow() external view returns (address);
function tin() external view returns (uint256);
function tout() external view returns (uint256);
function file(bytes32 what, uint256 data) external;
function hope(address) external;
function nope(address) external;
function sellGem(address usr, uint256 gemAmt) external;
function buyGem(address usr, uint256 gemAmt) external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/SpotAbstract.sol
// https://github.com/makerdao/dss/blob/master/src/spot.sol
interface SpotAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function ilks(bytes32) external view returns (address, uint256);
function vat() external view returns (address);
function par() external view returns (uint256);
function live() external view returns (uint256);
function file(bytes32, bytes32, address) external;
function file(bytes32, uint256) external;
function file(bytes32, bytes32, uint256) external;
function poke(bytes32) external;
function cage() external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/StairstepExponentialDecreaseAbstract.sol
/// StairstepExponentialDecreaseAbstract.sol -- StairstepExponentialDecrease Interface
// Copyright (C) 2021 Maker Ecosystem Growth Holdings, INC.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
interface StairstepExponentialDecreaseAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function step() external view returns (uint256);
function cut() external view returns (uint256);
function file(bytes32,uint256) external;
function price(uint256,uint256) external view returns (uint256);
}
// lib/dss-test/lib/dss-interfaces/src/dss/VatAbstract.sol
// https://github.com/makerdao/dss/blob/master/src/vat.sol
interface VatAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function can(address, address) external view returns (uint256);
function hope(address) external;
function nope(address) external;
function ilks(bytes32) external view returns (uint256, uint256, uint256, uint256, uint256);
function urns(bytes32, address) external view returns (uint256, uint256);
function gem(bytes32, address) external view returns (uint256);
function dai(address) external view returns (uint256);
function sin(address) external view returns (uint256);
function debt() external view returns (uint256);
function vice() external view returns (uint256);
function Line() external view returns (uint256);
function live() external view returns (uint256);
function init(bytes32) external;
function file(bytes32, uint256) external;
function file(bytes32, bytes32, uint256) external;
function cage() external;
function slip(bytes32, address, int256) external;
function flux(bytes32, address, address, uint256) external;
function move(address, address, uint256) external;
function frob(bytes32, address, address, address, int256, int256) external;
function fork(bytes32, address, address, int256, int256) external;
function grab(bytes32, address, address, address, int256, int256) external;
function heal(uint256) external;
function suck(address, address, uint256) external;
function fold(bytes32, address, int256) external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/VestAbstract.sol
// https://github.com/makerdao/dss-vest/blob/master/src/DssVest.sol
interface VestAbstract {
function TWENTY_YEARS() external view returns (uint256);
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function awards(uint256) external view returns (address, uint48, uint48, uint48, address, uint8, uint128, uint128);
function ids() external view returns (uint256);
function cap() external view returns (uint256);
function usr(uint256) external view returns (address);
function bgn(uint256) external view returns (uint256);
function clf(uint256) external view returns (uint256);
function fin(uint256) external view returns (uint256);
function mgr(uint256) external view returns (address);
function res(uint256) external view returns (uint256);
function tot(uint256) external view returns (uint256);
function rxd(uint256) external view returns (uint256);
function file(bytes32, uint256) external;
function create(address, uint256, uint256, uint256, uint256, address) external returns (uint256);
function vest(uint256) external;
function vest(uint256, uint256) external;
function accrued(uint256) external view returns (uint256);
function unpaid(uint256) external view returns (uint256);
function restrict(uint256) external;
function unrestrict(uint256) external;
function yank(uint256) external;
function yank(uint256, uint256) external;
function move(uint256, address) external;
function valid(uint256) external view returns (bool);
}
// lib/dss-test/lib/dss-interfaces/src/dss/VowAbstract.sol
// https://github.com/makerdao/dss/blob/master/src/vow.sol
interface VowAbstract {
function wards(address) external view returns (uint256);
function rely(address usr) external;
function deny(address usr) external;
function vat() external view returns (address);
function flapper() external view returns (address);
function flopper() external view returns (address);
function sin(uint256) external view returns (uint256);
function Sin() external view returns (uint256);
function Ash() external view returns (uint256);
function wait() external view returns (uint256);
function dump() external view returns (uint256);
function sump() external view returns (uint256);
function bump() external view returns (uint256);
function hump() external view returns (uint256);
function live() external view returns (uint256);
function file(bytes32, uint256) external;
function file(bytes32, address) external;
function fess(uint256) external;
function flog(uint256) external;
function heal(uint256) external;
function kiss(uint256) external;
function flop() external returns (uint256);
function flap() external returns (uint256);
function cage() external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/mip21/RwaInputConduitAbstract.sol
// SPDX-FileCopyrightText: © 2022 Dai Foundation <www.daifoundation.org>
interface RwaInputConduitBaseAbstract {
function dai() external view returns (address);
function to() external view returns (address);
function push() external;
}
// https://github.com/makerdao/mip21-toolkit/blob/master/src/conduits/RwaInputConduit.sol
interface RwaInputConduitAbstract is RwaInputConduitBaseAbstract {
function gov() external view returns (address);
}
// https://github.com/makerdao/mip21-toolkit/blob/master/src/conduits/RwaInputConduit2.sol
interface RwaInputConduit2Abstract is RwaInputConduitBaseAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function may(address) external view returns (uint256);
function mate(address) external;
function hate(address) external;
}
// https://github.com/makerdao/mip21-toolkit/blob/master/src/conduits/RwaInputConduit3.sol
interface RwaInputConduit3Abstract is RwaInputConduitBaseAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function may(address) external view returns (uint256);
function mate(address) external;
function hate(address) external;
function psm() external view returns (address);
function gem() external view returns (address);
function quitTo() external view returns (address);
function file(bytes32, address) external;
function push(uint) external;
function quit() external;
function quit(uint) external;
function yank(address, address, uint256) external;
function expectedDaiWad(uint256) external view returns (uint256);
function requiredGemAmt(uint256) external view returns (uint256);
}
// lib/dss-test/lib/dss-interfaces/src/dss/mip21/RwaJarAbstract.sol
// SPDX-FileCopyrightText: © 2022 Dai Foundation <www.daifoundation.org>
// https://github.com/makerdao/mip21-toolkit/blob/master/src/jars/RwaJar.sol
interface RwaJarAbstract {
function daiJoin() external view returns(address);
function dai() external view returns(address);
function chainlog() external view returns(address);
function void() external;
function toss(uint256) external;
}
// lib/dss-test/lib/dss-interfaces/src/dss/mip21/RwaLiquidationOracleAbstract.sol
// SPDX-FileCopyrightText: © 2022 Dai Foundation <www.daifoundation.org>
// https://github.com/makerdao/mip21-toolkit/blob/master/src/oracles/RwaLiquidationOracle.sol
interface RwaLiquidationOracleAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function vat() external view returns (address);
function vow() external view returns (address);
function ilks(bytes32) external view returns(string memory, address, uint48, uint48);
function file(bytes32, address) external;
function init(bytes32, uint256, string calldata, uint48) external;
function bump(bytes32, uint256) external;
function tell(bytes32) external;
function cure(bytes32) external;
function cull(bytes32, address) external;
function good(bytes32) external view returns (bool);
}
// lib/dss-test/lib/dss-interfaces/src/dss/mip21/RwaOutputConduitAbstract.sol
// SPDX-FileCopyrightText: © 2022 Dai Foundation <www.daifoundation.org>
interface RwaOutputConduitBaseAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function can(address) external view returns (uint256);
function hope(address) external;
function nope(address) external;
function dai() external view returns (address);
function to() external view returns (address);
function pick(address) external;
function push() external;
}
// https://github.com/makerdao/mip21-toolkit/blob/master/src/conduits/RwaOutputConduit.sol
interface RwaOutputConduitAbstract is RwaOutputConduitBaseAbstract {
function gov() external view returns (address);
function bud(address) external view returns (uint256);
function kiss(address) external;
function diss(address) external;
}
// https://github.com/makerdao/mip21-toolkit/blob/master/src/conduits/RwaOutputConduit2.sol
interface RwaOutputConduit2Abstract is RwaOutputConduitBaseAbstract {
function may(address) external view returns (uint256);
function mate(address) external;
function hate(address) external;
}
// https://github.com/makerdao/mip21-toolkit/blob/master/src/conduits/RwaOutputConduit3.sol
interface RwaOutputConduit3Abstract is RwaOutputConduitBaseAbstract {
function bud(address) external view returns (uint256);
function kiss(address) external;
function diss(address) external;
function may(address) external view returns (uint256);
function mate(address) external;
function hate(address) external;
function psm() external view returns (address);
function gem() external view returns (address);
function quitTo() external view returns (address);
function file(bytes32, address) external;
function push(uint) external;
function quit() external;
function quit(uint) external;
function yank(address, address, uint256) external;
function expectedGemAmt(uint256) external view returns (uint256);
function requiredDaiWad(uint256) external view returns (uint256);
}
// lib/dss-test/lib/dss-interfaces/src/dss/mip21/RwaUrnAbstract.sol
// SPDX-FileCopyrightText: © 2022 Dai Foundation <www.daifoundation.org>
// https://github.com/makerdao/mip21-toolkit/blob/master/src/urns/RwaUrn.sol
// https://github.com/makerdao/mip21-toolkit/blob/master/src/urns/RwaUrn2.sol
interface RwaUrnAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
function can(address) external view returns (uint256);
function hope(address) external;
function nope(address) external;
function vat() external view returns (address);
function jug() external view returns (address);
function gemJoin() external view returns (address);
function daiJoin() external view returns (address);
function outputConduit() external view returns (address);
function file(bytes32, address) external;
function lock(uint256) external;
function draw(uint256) external;
function wipe(uint256) external;
function free(uint256) external;
function quit() external;
}
// lib/dss-test/lib/dss-interfaces/src/sai/GemPitAbstract.sol
// https://github.com/makerdao/sai/blob/master/src/pit.sol
interface GemPitAbstract {
function burn(address) external;
}
// lib/dss-test/lib/dss-interfaces/src/sai/SaiMomAbstract.sol
// https://github.com/makerdao/sai/blob/master/src/mom.sol
interface SaiMomAbstract {
function tub() external view returns (address);
function tap() external view returns (address);
function vox() external view returns (address);
function setCap(uint256) external;
function setMat(uint256) external;
function setTax(uint256) external;
function setFee(uint256) external;
function setAxe(uint256) external;
function setTubGap(uint256) external;
function setPip(address) external;
function setPep(address) external;
function setVox(address) external;
function setTapGap(uint256) external;
function setWay(uint256) external;
function setHow(uint256) external;
function authority() external view returns (address);
function owner() external view returns (address);
function setOwner(address) external;
function setAuthority(address) external;
}
// lib/dss-test/lib/dss-interfaces/src/sai/SaiTapAbstract.sol
// https://github.com/makerdao/sai/blob/master/src/tap.sol
interface SaiTapAbstract {
function sai() external view returns (address);
function sin() external view returns (address);
function skr() external view returns (address);
function vox() external view returns (address);
function tub() external view returns (address);
function gap() external view returns (uint256);
function off() external view returns (bool);
function fix() external view returns (uint256);
function joy() external view returns (uint256);
function woe() external view returns (uint256);
function fog() external view returns (uint256);
function mold(bytes32, uint256) external;
function heal() external;
function s2s() external returns (uint256);
function bid(uint256) external returns (uint256);
function ask(uint256) external returns (uint256);
function bust(uint256) external;
function boom(uint256) external;
function cage(uint256) external;
function cash(uint256) external;
function mock(uint256) external;
function vent() external;
function authority() external view returns (address);
function owner() external view returns (address);
function setOwner(address) external;
function setAuthority(address) external;
}
// lib/dss-test/lib/dss-interfaces/src/sai/SaiTopAbstract.sol
// https://github.com/makerdao/sai/blob/master/src/top.sol
interface SaiTopAbstract {
function vox() external view returns (address);
function tub() external view returns (address);
function tap() external view returns (address);
function sai() external view returns (address);
function sin() external view returns (address);
function skr() external view returns (address);
function gem() external view returns (address);
function fix() external view returns (uint256);
function fit() external view returns (uint256);
function caged() external view returns (uint256);
function cooldown() external view returns (uint256);
function era() external view returns (uint256);
function cage() external;
function flow() external;
function setCooldown(uint256) external;
function authority() external view returns (address);
function owner() external view returns (address);
function setOwner(address) external;
function setAuthority(address) external;
}
// lib/dss-test/lib/dss-interfaces/src/sai/SaiTubAbstract.sol
// https://github.com/makerdao/sai/blob/master/src/tub.sol
interface SaiTubAbstract {
function sai() external view returns (address);
function sin() external view returns (address);
function skr() external view returns (address);
function gem() external view returns (address);
function gov() external view returns (address);
function vox() external view returns (address);
function pip() external view returns (address);
function pep() external view returns (address);
function tap() external view returns (address);
function pit() external view returns (address);
function axe() external view returns (uint256);
function cap() external view returns (uint256);
function mat() external view returns (uint256);
function tax() external view returns (uint256);
function fee() external view returns (uint256);
function gap() external view returns (uint256);
function off() external view returns (bool);
function out() external view returns (bool);
function fit() external view returns (uint256);
function rho() external view returns (uint256);
function rum() external view returns (uint256);
function cupi() external view returns (uint256);
function cups(bytes32) external view returns (address, uint256, uint256, uint256);
function lad(bytes32) external view returns (address);
function ink(bytes32) external view returns (address);
function tab(bytes32) external view returns (uint256);
function rap(bytes32) external returns (uint256);
function din() external returns (uint256);
function air() external view returns (uint256);
function pie() external view returns (uint256);
function era() external view returns (uint256);
function mold(bytes32, uint256) external;
function setPip(address) external;
function setPep(address) external;
function setVox(address) external;
function turn(address) external;
function per() external view returns (uint256);
function ask(uint256) external view returns (uint256);
function bid(uint256) external view returns (uint256);
function join(uint256) external;
function exit(uint256) external;
function chi() external returns (uint256);
function rhi() external returns (uint256);
function drip() external;
function tag() external view returns (uint256);
function safe(bytes32) external returns (bool);
function open() external returns (bytes32);
function give(bytes32, address) external;
function lock(bytes32, uint256) external;
function free(bytes32, uint256) external;
function draw(bytes32, uint256) external;
function wipe(bytes32, uint256) external;
function shut(bytes32) external;
function bite(bytes32) external;
function cage(uint256, uint256) external;
function flow() external;
function authority() external view returns (address);
function owner() external view returns (address);
function setOwner(address) external;
function setAuthority(address) external;
}
// lib/dss-test/lib/dss-interfaces/src/sai/SaiVoxAbstract.sol
// https://github.com/makerdao/sai/blob/master/src/vox.sol
interface SaiVoxAbstract {
function fix() external view returns (uint256);
function how() external view returns (uint256);
function tau() external view returns (uint256);
function era() external view returns (uint256);
function mold(bytes32, uint256) external;
function par() external returns (uint256);
function way() external returns (uint256);
function tell(uint256) external;
function tune(uint256) external;
function prod() external;
function authority() external view returns (address);
function owner() external view returns (address);
function setOwner(address) external;
function setAuthority(address) external;
}
// lib/dss-test/lib/dss-interfaces/src/utils/WardsAbstract.sol
interface WardsAbstract {
function wards(address) external view returns (uint256);
function rely(address) external;
function deny(address) external;
}
// lib/dss-test/lib/forge-std/src/Vm.sol
// Automatically @generated by scripts/vm.py. Do not modify manually.
/// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may
/// result in Script simulations differing from on-chain execution. It is recommended to only use
/// these cheats in scripts.
interface VmSafe {
/// A modification applied to either `msg.sender` or `tx.origin`. Returned by `readCallers`.
enum CallerMode {
// No caller modification is currently active.
None,
// A one time broadcast triggered by a `vm.broadcast()` call is currently active.
Broadcast,
// A recurrent broadcast triggered by a `vm.startBroadcast()` call is currently active.
RecurrentBroadcast,
// A one time prank triggered by a `vm.prank()` call is currently active.
Prank,
// A recurrent prank triggered by a `vm.startPrank()` call is currently active.
RecurrentPrank
}
/// The kind of account access that occurred.
enum AccountAccessKind {
// The account was called.
Call,
// The account was called via delegatecall.
DelegateCall,
// The account was called via callcode.
CallCode,
// The account was called via staticcall.
StaticCall,
// The account was created.
Create,
// The account was selfdestructed.
SelfDestruct,
// Synthetic access indicating the current context has resumed after a previous sub-context (AccountAccess).
Resume,
// The account's balance was read.
Balance,
// The account's codesize was read.
Extcodesize,
// The account's codehash was read.
Extcodehash,
// The account's code was copied.
Extcodecopy
}
/// Forge execution contexts.
enum ForgeContext {
// Test group execution context (test, coverage or snapshot).
TestGroup,
// `forge test` execution context.
Test,
// `forge coverage` execution context.
Coverage,
// `forge snapshot` execution context.
Snapshot,
// Script group execution context (dry run, broadcast or resume).
ScriptGroup,
// `forge script` execution context.
ScriptDryRun,
// `forge script --broadcast` execution context.
ScriptBroadcast,
// `forge script --resume` execution context.
ScriptResume,
// Unknown `forge` execution context.
Unknown
}
/// An Ethereum log. Returned by `getRecordedLogs`.
struct Log {
// The topics of the log, including the signature, if any.
bytes32[] topics;
// The raw data of the log.
bytes data;
// The address of the log's emitter.
address emitter;
}
/// An RPC URL and its alias. Returned by `rpcUrlStructs`.
struct Rpc {
// The alias of the RPC URL.
string key;
// The RPC URL.
string url;
}
/// An RPC log object. Returned by `eth_getLogs`.
struct EthGetLogs {
// The address of the log's emitter.
address emitter;
// The topics of the log, including the signature, if any.
bytes32[] topics;
// The raw data of the log.
bytes data;
// The block hash.
bytes32 blockHash;
// The block number.
uint64 blockNumber;
// The transaction hash.
bytes32 transactionHash;
// The transaction index in the block.
uint64 transactionIndex;
// The log index.
uint256 logIndex;
// Whether the log was removed.
bool removed;
}
/// A single entry in a directory listing. Returned by `readDir`.
struct DirEntry {
// The error message, if any.
string errorMessage;
// The path of the entry.
string path;
// The depth of the entry.
uint64 depth;
// Whether the entry is a directory.
bool isDir;
// Whether the entry is a symlink.
bool isSymlink;
}
/// Metadata information about a file.
/// This structure is returned from the `fsMetadata` function and represents known
/// metadata about a file such as its permissions, size, modification
/// times, etc.
struct FsMetadata {
// True if this metadata is for a directory.
bool isDir;
// True if this metadata is for a symlink.
bool isSymlink;
// The size of the file, in bytes, this metadata is for.
uint256 length;
// True if this metadata is for a readonly (unwritable) file.
bool readOnly;
// The last modification time listed in this metadata.
uint256 modified;
// The last access time of this metadata.
uint256 accessed;
// The creation time listed in this metadata.
uint256 created;
}
/// A wallet with a public and private key.
struct Wallet {
// The wallet's address.
address addr;
// The wallet's public key `X`.
uint256 publicKeyX;
// The wallet's public key `Y`.
uint256 publicKeyY;
// The wallet's private key.
uint256 privateKey;
}
/// The result of a `tryFfi` call.
struct FfiResult {
// The exit code of the call.
int32 exitCode;
// The optionally hex-decoded `stdout` data.
bytes stdout;
// The `stderr` data.
bytes stderr;
}
/// Information on the chain and fork.
struct ChainInfo {
// The fork identifier. Set to zero if no fork is active.
uint256 forkId;
// The chain ID of the current fork.
uint256 chainId;
}
/// The result of a `stopAndReturnStateDiff` call.
struct AccountAccess {
// The chain and fork the access occurred.
ChainInfo chainInfo;
// The kind of account access that determines what the account is.
// If kind is Call, DelegateCall, StaticCall or CallCode, then the account is the callee.
// If kind is Create, then the account is the newly created account.
// If kind is SelfDestruct, then the account is the selfdestruct recipient.
// If kind is a Resume, then account represents a account context that has resumed.
AccountAccessKind kind;
// The account that was accessed.
// It's either the account created, callee or a selfdestruct recipient for CREATE, CALL or SELFDESTRUCT.
address account;
// What accessed the account.
address accessor;
// If the account was initialized or empty prior to the access.
// An account is considered initialized if it has code, a
// non-zero nonce, or a non-zero balance.
bool initialized;
// The previous balance of the accessed account.
uint256 oldBalance;
// The potential new balance of the accessed account.
// That is, all balance changes are recorded here, even if reverts occurred.
uint256 newBalance;
// Code of the account deployed by CREATE.
bytes deployedCode;
// Value passed along with the account access
uint256 value;
// Input data provided to the CREATE or CALL
bytes data;
// If this access reverted in either the current or parent context.
bool reverted;
// An ordered list of storage accesses made during an account access operation.
StorageAccess[] storageAccesses;
// Call depth traversed during the recording of state differences
uint64 depth;
}
/// The storage accessed during an `AccountAccess`.
struct StorageAccess {
// The account whose storage was accessed.
address account;
// The slot that was accessed.
bytes32 slot;
// If the access was a write.
bool isWrite;
// The previous value of the slot.
bytes32 previousValue;
// The new value of the slot.
bytes32 newValue;
// If the access was reverted.
bool reverted;
}
/// Gas used. Returned by `lastCallGas`.
struct Gas {
// The gas limit of the call.
uint64 gasLimit;
// The total gas used.
uint64 gasTotalUsed;
// The amount of gas used for memory expansion.
uint64 gasMemoryUsed;
// The amount of gas refunded.
int64 gasRefunded;
// The amount of gas remaining.
uint64 gasRemaining;
}
// ======== Environment ========
/// Gets the environment variable `name` and parses it as `address`.
/// Reverts if the variable was not found or could not be parsed.
function envAddress(string calldata name) external view returns (address value);
/// Gets the environment variable `name` and parses it as an array of `address`, delimited by `delim`.
/// Reverts if the variable was not found or could not be parsed.
function envAddress(string calldata name, string calldata delim) external view returns (address[] memory value);
/// Gets the environment variable `name` and parses it as `bool`.
/// Reverts if the variable was not found or could not be parsed.
function envBool(string calldata name) external view returns (bool value);
/// Gets the environment variable `name` and parses it as an array of `bool`, delimited by `delim`.
/// Reverts if the variable was not found or could not be parsed.
function envBool(string calldata name, string calldata delim) external view returns (bool[] memory value);
/// Gets the environment variable `name` and parses it as `bytes32`.
/// Reverts if the variable was not found or could not be parsed.
function envBytes32(string calldata name) external view returns (bytes32 value);
/// Gets the environment variable `name` and parses it as an array of `bytes32`, delimited by `delim`.
/// Reverts if the variable was not found or could not be parsed.
function envBytes32(string calldata name, string calldata delim) external view returns (bytes32[] memory value);
/// Gets the environment variable `name` and parses it as `bytes`.
/// Reverts if the variable was not found or could not be parsed.
function envBytes(string calldata name) external view returns (bytes memory value);
/// Gets the environment variable `name` and parses it as an array of `bytes`, delimited by `delim`.
/// Reverts if the variable was not found or could not be parsed.
function envBytes(string calldata name, string calldata delim) external view returns (bytes[] memory value);
/// Gets the environment variable `name` and returns true if it exists, else returns false.
function envExists(string calldata name) external view returns (bool result);
/// Gets the environment variable `name` and parses it as `int256`.
/// Reverts if the variable was not found or could not be parsed.
function envInt(string calldata name) external view returns (int256 value);
/// Gets the environment variable `name` and parses it as an array of `int256`, delimited by `delim`.
/// Reverts if the variable was not found or could not be parsed.
function envInt(string calldata name, string calldata delim) external view returns (int256[] memory value);
/// Gets the environment variable `name` and parses it as `bool`.
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
function envOr(string calldata name, bool defaultValue) external view returns (bool value);
/// Gets the environment variable `name` and parses it as `uint256`.
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
function envOr(string calldata name, uint256 defaultValue) external view returns (uint256 value);
/// Gets the environment variable `name` and parses it as an array of `address`, delimited by `delim`.
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
function envOr(string calldata name, string calldata delim, address[] calldata defaultValue)
external
view
returns (address[] memory value);
/// Gets the environment variable `name` and parses it as an array of `bytes32`, delimited by `delim`.
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue)
external
view
returns (bytes32[] memory value);
/// Gets the environment variable `name` and parses it as an array of `string`, delimited by `delim`.
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
function envOr(string calldata name, string calldata delim, string[] calldata defaultValue)
external
view
returns (string[] memory value);
/// Gets the environment variable `name` and parses it as an array of `bytes`, delimited by `delim`.
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue)
external
view
returns (bytes[] memory value);
/// Gets the environment variable `name` and parses it as `int256`.
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
function envOr(string calldata name, int256 defaultValue) external view returns (int256 value);
/// Gets the environment variable `name` and parses it as `address`.
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
function envOr(string calldata name, address defaultValue) external view returns (address value);
/// Gets the environment variable `name` and parses it as `bytes32`.
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
function envOr(string calldata name, bytes32 defaultValue) external view returns (bytes32 value);
/// Gets the environment variable `name` and parses it as `string`.
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
function envOr(string calldata name, string calldata defaultValue) external view returns (string memory value);
/// Gets the environment variable `name` and parses it as `bytes`.
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
function envOr(string calldata name, bytes calldata defaultValue) external view returns (bytes memory value);
/// Gets the environment variable `name` and parses it as an array of `bool`, delimited by `delim`.
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue)
external
view
returns (bool[] memory value);
/// Gets the environment variable `name` and parses it as an array of `uint256`, delimited by `delim`.
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue)
external
view
returns (uint256[] memory value);
/// Gets the environment variable `name` and parses it as an array of `int256`, delimited by `delim`.
/// Reverts if the variable could not be parsed.
/// Returns `defaultValue` if the variable was not found.
function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue)
external
view
returns (int256[] memory value);
/// Gets the environment variable `name` and parses it as `string`.
/// Reverts if the variable was not found or could not be parsed.
function envString(string calldata name) external view returns (string memory value);
/// Gets the environment variable `name` and parses it as an array of `string`, delimited by `delim`.
/// Reverts if the variable was not found or could not be parsed.
function envString(string calldata name, string calldata delim) external view returns (string[] memory value);
/// Gets the environment variable `name` and parses it as `uint256`.
/// Reverts if the variable was not found or could not be parsed.
function envUint(string calldata name) external view returns (uint256 value);
/// Gets the environment variable `name` and parses it as an array of `uint256`, delimited by `delim`.
/// Reverts if the variable was not found or could not be parsed.
function envUint(string calldata name, string calldata delim) external view returns (uint256[] memory value);
/// Returns true if `forge` command was executed in given context.
function isContext(ForgeContext context) external view returns (bool result);
/// Sets environment variables.
function setEnv(string calldata name, string calldata value) external;
// ======== EVM ========
/// Gets all accessed reads and write slot from a `vm.record` session, for a given address.
function accesses(address target) external returns (bytes32[] memory readSlots, bytes32[] memory writeSlots);
/// Gets the address for a given private key.
function addr(uint256 privateKey) external pure returns (address keyAddr);
/// Gets all the logs according to specified filter.
function eth_getLogs(uint256 fromBlock, uint256 toBlock, address target, bytes32[] calldata topics)
external
returns (EthGetLogs[] memory logs);
/// Gets the current `block.blobbasefee`.
/// You should use this instead of `block.blobbasefee` if you use `vm.blobBaseFee`, as `block.blobbasefee` is assumed to be constant across a transaction,
/// and as a result will get optimized out by the compiler.
/// See https://github.com/foundry-rs/foundry/issues/6180
function getBlobBaseFee() external view returns (uint256 blobBaseFee);
/// Gets the current `block.number`.
/// You should use this instead of `block.number` if you use `vm.roll`, as `block.number` is assumed to be constant across a transaction,
/// and as a result will get optimized out by the compiler.
/// See https://github.com/foundry-rs/foundry/issues/6180
function getBlockNumber() external view returns (uint256 height);
/// Gets the current `block.timestamp`.
/// You should use this instead of `block.timestamp` if you use `vm.warp`, as `block.timestamp` is assumed to be constant across a transaction,
/// and as a result will get optimized out by the compiler.
/// See https://github.com/foundry-rs/foundry/issues/6180
function getBlockTimestamp() external view returns (uint256 timestamp);
/// Gets the map key and parent of a mapping at a given slot, for a given address.
function getMappingKeyAndParentOf(address target, bytes32 elementSlot)
external
returns (bool found, bytes32 key, bytes32 parent);
/// Gets the number of elements in the mapping at the given slot, for a given address.
function getMappingLength(address target, bytes32 mappingSlot) external returns (uint256 length);
/// Gets the elements at index idx of the mapping at the given slot, for a given address. The
/// index must be less than the length of the mapping (i.e. the number of keys in the mapping).
function getMappingSlotAt(address target, bytes32 mappingSlot, uint256 idx) external returns (bytes32 value);
/// Gets the nonce of an account.
function getNonce(address account) external view returns (uint64 nonce);
/// Gets all the recorded logs.
function getRecordedLogs() external returns (Log[] memory logs);
/// Gets the gas used in the last call.
function lastCallGas() external view returns (Gas memory gas);
/// Loads a storage slot from an address.
function load(address target, bytes32 slot) external view returns (bytes32 data);
/// Pauses gas metering (i.e. gas usage is not counted). Noop if already paused.
function pauseGasMetering() external;
/// Records all storage reads and writes.
function record() external;
/// Record all the transaction logs.
function recordLogs() external;
/// Resumes gas metering (i.e. gas usage is counted again). Noop if already on.
function resumeGasMetering() external;
/// Performs an Ethereum JSON-RPC request to the current fork URL.
function rpc(string calldata method, string calldata params) external returns (bytes memory data);
/// Signs `digest` with `privateKey` using the secp256r1 curve.
function signP256(uint256 privateKey, bytes32 digest) external pure returns (bytes32 r, bytes32 s);
/// Signs `digest` with `privateKey` using the secp256k1 curve.
function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);
/// Signs `digest` with signer provided to script using the secp256k1 curve.
/// If `--sender` is provided, the signer with provided address is used, otherwise,
/// if exactly one signer is provided to the script, that signer is used.
/// Raises error if signer passed through `--sender` does not match any unlocked signers or
/// if `--sender` is not provided and not exactly one signer is passed to the script.
function sign(bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);
/// Signs `digest` with signer provided to script using the secp256k1 curve.
/// Raises error if none of the signers passed into the script have provided address.
function sign(address signer, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);
/// Starts recording all map SSTOREs for later retrieval.
function startMappingRecording() external;
/// Record all account accesses as part of CREATE, CALL or SELFDESTRUCT opcodes in order,
/// along with the context of the calls
function startStateDiffRecording() external;
/// Returns an ordered array of all account accesses from a `vm.startStateDiffRecording` session.
function stopAndReturnStateDiff() external returns (AccountAccess[] memory accountAccesses);
/// Stops recording all map SSTOREs for later retrieval and clears the recorded data.
function stopMappingRecording() external;
// ======== Filesystem ========
/// Closes file for reading, resetting the offset and allowing to read it from beginning with readLine.
/// `path` is relative to the project root.
function closeFile(string calldata path) external;
/// Copies the contents of one file to another. This function will **overwrite** the contents of `to`.
/// On success, the total number of bytes copied is returned and it is equal to the length of the `to` file as reported by `metadata`.
/// Both `from` and `to` are relative to the project root.
function copyFile(string calldata from, string calldata to) external returns (uint64 copied);
/// Creates a new, empty directory at the provided path.
/// This cheatcode will revert in the following situations, but is not limited to just these cases:
/// - User lacks permissions to modify `path`.
/// - A parent of the given path doesn't exist and `recursive` is false.
/// - `path` already exists and `recursive` is false.
/// `path` is relative to the project root.
function createDir(string calldata path, bool recursive) external;
/// Returns true if the given path points to an existing entity, else returns false.
function exists(string calldata path) external returns (bool result);
/// Performs a foreign function call via the terminal.
function ffi(string[] calldata commandInput) external returns (bytes memory result);
/// Given a path, query the file system to get information about a file, directory, etc.
function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata);
/// Gets the creation bytecode from an artifact file. Takes in the relative path to the json file or the path to the
/// artifact in the form of <path>:<contract>:<version> where <contract> and <version> parts are optional.
function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode);
/// Gets the deployed bytecode from an artifact file. Takes in the relative path to the json file or the path to the
/// artifact in the form of <path>:<contract>:<version> where <contract> and <version> parts are optional.
function getDeployedCode(string calldata artifactPath) external view returns (bytes memory runtimeBytecode);
/// Returns true if the path exists on disk and is pointing at a directory, else returns false.
function isDir(string calldata path) external returns (bool result);
/// Returns true if the path exists on disk and is pointing at a regular file, else returns false.
function isFile(string calldata path) external returns (bool result);
/// Get the path of the current project root.
function projectRoot() external view returns (string memory path);
/// Prompts the user for a string value in the terminal.
function prompt(string calldata promptText) external returns (string memory input);
/// Prompts the user for an address in the terminal.
function promptAddress(string calldata promptText) external returns (address);
/// Prompts the user for a hidden string value in the terminal.
function promptSecret(string calldata promptText) external returns (string memory input);
/// Prompts the user for uint256 in the terminal.
function promptUint(string calldata promptText) external returns (uint256);
/// Reads the directory at the given path recursively, up to `maxDepth`.
/// `maxDepth` defaults to 1, meaning only the direct children of the given directory will be returned.
/// Follows symbolic links if `followLinks` is true.
function readDir(string calldata path) external view returns (DirEntry[] memory entries);
/// See `readDir(string)`.
function readDir(string calldata path, uint64 maxDepth) external view returns (DirEntry[] memory entries);
/// See `readDir(string)`.
function readDir(string calldata path, uint64 maxDepth, bool followLinks)
external
view
returns (DirEntry[] memory entries);
/// Reads the entire content of file to string. `path` is relative to the project root.
function readFile(string calldata path) external view returns (string memory data);
/// Reads the entire content of file as binary. `path` is relative to the project root.
function readFileBinary(string calldata path) external view returns (bytes memory data);
/// Reads next line of file to string.
function readLine(string calldata path) external view returns (string memory line);
/// Reads a symbolic link, returning the path that the link points to.
/// This cheatcode will revert in the following situations, but is not limited to just these cases:
/// - `path` is not a symbolic link.
/// - `path` does not exist.
function readLink(string calldata linkPath) external view returns (string memory targetPath);
/// Removes a directory at the provided path.
/// This cheatcode will revert in the following situations, but is not limited to just these cases:
/// - `path` doesn't exist.
/// - `path` isn't a directory.
/// - User lacks permissions to modify `path`.
/// - The directory is not empty and `recursive` is false.
/// `path` is relative to the project root.
function removeDir(string calldata path, bool recursive) external;
/// Removes a file from the filesystem.
/// This cheatcode will revert in the following situations, but is not limited to just these cases:
/// - `path` points to a directory.
/// - The file doesn't exist.
/// - The user lacks permissions to remove the file.
/// `path` is relative to the project root.
function removeFile(string calldata path) external;
/// Performs a foreign function call via terminal and returns the exit code, stdout, and stderr.
function tryFfi(string[] calldata commandInput) external returns (FfiResult memory result);
/// Returns the time since unix epoch in milliseconds.
function unixTime() external returns (uint256 milliseconds);
/// Writes data to file, creating a file if it does not exist, and entirely replacing its contents if it does.
/// `path` is relative to the project root.
function writeFile(string calldata path, string calldata data) external;
/// Writes binary data to a file, creating a file if it does not exist, and entirely replacing its contents if it does.
/// `path` is relative to the project root.
function writeFileBinary(string calldata path, bytes calldata data) external;
/// Writes line to file, creating a file if it does not exist.
/// `path` is relative to the project root.
function writeLine(string calldata path, string calldata data) external;
// ======== JSON ========
/// Checks if `key` exists in a JSON object
/// `keyExists` is being deprecated in favor of `keyExistsJson`. It will be removed in future versions.
function keyExists(string calldata json, string calldata key) external view returns (bool);
/// Checks if `key` exists in a JSON object.
function keyExistsJson(string calldata json, string calldata key) external view returns (bool);
/// Parses a string of JSON data at `key` and coerces it to `address`.
function parseJsonAddress(string calldata json, string calldata key) external pure returns (address);
/// Parses a string of JSON data at `key` and coerces it to `address[]`.
function parseJsonAddressArray(string calldata json, string calldata key)
external
pure
returns (address[] memory);
/// Parses a string of JSON data at `key` and coerces it to `bool`.
function parseJsonBool(string calldata json, string calldata key) external pure returns (bool);
/// Parses a string of JSON data at `key` and coerces it to `bool[]`.
function parseJsonBoolArray(string calldata json, string calldata key) external pure returns (bool[] memory);
/// Parses a string of JSON data at `key` and coerces it to `bytes`.
function parseJsonBytes(string calldata json, string calldata key) external pure returns (bytes memory);
/// Parses a string of JSON data at `key` and coerces it to `bytes32`.
function parseJsonBytes32(string calldata json, string calldata key) external pure returns (bytes32);
/// Parses a string of JSON data at `key` and coerces it to `bytes32[]`.
function parseJsonBytes32Array(string calldata json, string calldata key)
external
pure
returns (bytes32[] memory);
/// Parses a string of JSON data at `key` and coerces it to `bytes[]`.
function parseJsonBytesArray(string calldata json, string calldata key) external pure returns (bytes[] memory);
/// Parses a string of JSON data at `key` and coerces it to `int256`.
function parseJsonInt(string calldata json, string calldata key) external pure returns (int256);
/// Parses a string of JSON data at `key` and coerces it to `int256[]`.
function parseJsonIntArray(string calldata json, string calldata key) external pure returns (int256[] memory);
/// Returns an array of all the keys in a JSON object.
function parseJsonKeys(string calldata json, string calldata key) external pure returns (string[] memory keys);
/// Parses a string of JSON data at `key` and coerces it to `string`.
function parseJsonString(string calldata json, string calldata key) external pure returns (string memory);
/// Parses a string of JSON data at `key` and coerces it to `string[]`.
function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory);
/// Parses a string of JSON data at `key` and coerces it to `uint256`.
function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256);
/// Parses a string of JSON data at `key` and coerces it to `uint256[]`.
function parseJsonUintArray(string calldata json, string calldata key) external pure returns (uint256[] memory);
/// ABI-encodes a JSON object.
function parseJson(string calldata json) external pure returns (bytes memory abiEncodedData);
/// ABI-encodes a JSON object at `key`.
function parseJson(string calldata json, string calldata key) external pure returns (bytes memory abiEncodedData);
/// See `serializeJson`.
function serializeAddress(string calldata objectKey, string calldata valueKey, address value)
external
returns (string memory json);
/// See `serializeJson`.
function serializeAddress(string calldata objectKey, string calldata valueKey, address[] calldata values)
external
returns (string memory json);
/// See `serializeJson`.
function serializeBool(string calldata objectKey, string calldata valueKey, bool value)
external
returns (string memory json);
/// See `serializeJson`.
function serializeBool(string calldata objectKey, string calldata valueKey, bool[] calldata values)
external
returns (string memory json);
/// See `serializeJson`.
function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32 value)
external
returns (string memory json);
/// See `serializeJson`.
function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32[] calldata values)
external
returns (string memory json);
/// See `serializeJson`.
function serializeBytes(string calldata objectKey, string calldata valueKey, bytes calldata value)
external
returns (string memory json);
/// See `serializeJson`.
function serializeBytes(string calldata objectKey, string calldata valueKey, bytes[] calldata values)
external
returns (string memory json);
/// See `serializeJson`.
function serializeInt(string calldata objectKey, string calldata valueKey, int256 value)
external
returns (string memory json);
/// See `serializeJson`.
function serializeInt(string calldata objectKey, string calldata valueKey, int256[] calldata values)
external
returns (string memory json);
/// Serializes a key and value to a JSON object stored in-memory that can be later written to a file.
/// Returns the stringified version of the specific JSON file up to that moment.
function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json);
/// See `serializeJson`.
function serializeString(string calldata objectKey, string calldata valueKey, string calldata value)
external
returns (string memory json);
/// See `serializeJson`.
function serializeString(string calldata objectKey, string calldata valueKey, string[] calldata values)
external
returns (string memory json);
/// See `serializeJson`.
function serializeUintToHex(string calldata objectKey, string calldata valueKey, uint256 value)
external
returns (string memory json);
/// See `serializeJson`.
function serializeUint(string calldata objectKey, string calldata valueKey, uint256 value)
external
returns (string memory json);
/// See `serializeJson`.
function serializeUint(string calldata objectKey, string calldata valueKey, uint256[] calldata values)
external
returns (string memory json);
/// Write a serialized JSON object to a file. If the file exists, it will be overwritten.
function writeJson(string calldata json, string calldata path) external;
/// Write a serialized JSON object to an **existing** JSON file, replacing a value with key = <value_key.>
/// This is useful to replace a specific value of a JSON file, without having to parse the entire thing.
function writeJson(string calldata json, string calldata path, string calldata valueKey) external;
// ======== Scripting ========
/// Has the next call (at this call depth only) create transactions that can later be signed and sent onchain.
/// Broadcasting address is determined by checking the following in order:
/// 1. If `--sender` argument was provided, that address is used.
/// 2. If exactly one signer (e.g. private key, hw wallet, keystore) is set when `forge broadcast` is invoked, that signer is used.
/// 3. Otherwise, default foundry sender (1804c8AB1F12E6bbf3894d4083f33e07309d1f38) is used.
function broadcast() external;
/// Has the next call (at this call depth only) create a transaction with the address provided
/// as the sender that can later be signed and sent onchain.
function broadcast(address signer) external;
/// Has the next call (at this call depth only) create a transaction with the private key
/// provided as the sender that can later be signed and sent onchain.
function broadcast(uint256 privateKey) external;
/// Has all subsequent calls (at this call depth only) create transactions that can later be signed and sent onchain.
/// Broadcasting address is determined by checking the following in order:
/// 1. If `--sender` argument was provided, that address is used.
/// 2. If exactly one signer (e.g. private key, hw wallet, keystore) is set when `forge broadcast` is invoked, that signer is used.
/// 3. Otherwise, default foundry sender (1804c8AB1F12E6bbf3894d4083f33e07309d1f38) is used.
function startBroadcast() external;
/// Has all subsequent calls (at this call depth only) create transactions with the address
/// provided that can later be signed and sent onchain.
function startBroadcast(address signer) external;
/// Has all subsequent calls (at this call depth only) create transactions with the private key
/// provided that can later be signed and sent onchain.
function startBroadcast(uint256 privateKey) external;
/// Stops collecting onchain transactions.
function stopBroadcast() external;
// ======== String ========
/// Returns the index of the first occurrence of a `key` in an `input` string.
/// Returns `NOT_FOUND` (i.e. `type(uint256).max`) if the `key` is not found.
/// Returns 0 in case of an empty `key`.
function indexOf(string calldata input, string calldata key) external pure returns (uint256);
/// Parses the given `string` into an `address`.
function parseAddress(string calldata stringifiedValue) external pure returns (address parsedValue);
/// Parses the given `string` into a `bool`.
function parseBool(string calldata stringifiedValue) external pure returns (bool parsedValue);
/// Parses the given `string` into `bytes`.
function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue);
/// Parses the given `string` into a `bytes32`.
function parseBytes32(string calldata stringifiedValue) external pure returns (bytes32 parsedValue);
/// Parses the given `string` into a `int256`.
function parseInt(string calldata stringifiedValue) external pure returns (int256 parsedValue);
/// Parses the given `string` into a `uint256`.
function parseUint(string calldata stringifiedValue) external pure returns (uint256 parsedValue);
/// Replaces occurrences of `from` in the given `string` with `to`.
function replace(string calldata input, string calldata from, string calldata to)
external
pure
returns (string memory output);
/// Splits the given `string` into an array of strings divided by the `delimiter`.
function split(string calldata input, string calldata delimiter) external pure returns (string[] memory outputs);
/// Converts the given `string` value to Lowercase.
function toLowercase(string calldata input) external pure returns (string memory output);
/// Converts the given value to a `string`.
function toString(address value) external pure returns (string memory stringifiedValue);
/// Converts the given value to a `string`.
function toString(bytes calldata value) external pure returns (string memory stringifiedValue);
/// Converts the given value to a `string`.
function toString(bytes32 value) external pure returns (string memory stringifiedValue);
/// Converts the given value to a `string`.
function toString(bool value) external pure returns (string memory stringifiedValue);
/// Converts the given value to a `string`.
function toString(uint256 value) external pure returns (string memory stringifiedValue);
/// Converts the given value to a `string`.
function toString(int256 value) external pure returns (string memory stringifiedValue);
/// Converts the given `string` value to Uppercase.
function toUppercase(string calldata input) external pure returns (string memory output);
/// Trims leading and trailing whitespace from the given `string` value.
function trim(string calldata input) external pure returns (string memory output);
// ======== Testing ========
/// Compares two `uint256` values. Expects difference to be less than or equal to `maxDelta`.
/// Formats values with decimals in failure message.
function assertApproxEqAbsDecimal(uint256 left, uint256 right, uint256 maxDelta, uint256 decimals) external pure;
/// Compares two `uint256` values. Expects difference to be less than or equal to `maxDelta`.
/// Formats values with decimals in failure message. Includes error message into revert string on failure.
function assertApproxEqAbsDecimal(
uint256 left,
uint256 right,
uint256 maxDelta,
uint256 decimals,
string calldata error
) external pure;
/// Compares two `int256` values. Expects difference to be less than or equal to `maxDelta`.
/// Formats values with decimals in failure message.
function assertApproxEqAbsDecimal(int256 left, int256 right, uint256 maxDelta, uint256 decimals) external pure;
/// Compares two `int256` values. Expects difference to be less than or equal to `maxDelta`.
/// Formats values with decimals in failure message. Includes error message into revert string on failure.
function assertApproxEqAbsDecimal(
int256 left,
int256 right,
uint256 maxDelta,
uint256 decimals,
string calldata error
) external pure;
/// Compares two `uint256` values. Expects difference to be less than or equal to `maxDelta`.
function assertApproxEqAbs(uint256 left, uint256 right, uint256 maxDelta) external pure;
/// Compares two `uint256` values. Expects difference to be less than or equal to `maxDelta`.
/// Includes error message into revert string on failure.
function assertApproxEqAbs(uint256 left, uint256 right, uint256 maxDelta, string calldata error) external pure;
/// Compares two `int256` values. Expects difference to be less than or equal to `maxDelta`.
function assertApproxEqAbs(int256 left, int256 right, uint256 maxDelta) external pure;
/// Compares two `int256` values. Expects difference to be less than or equal to `maxDelta`.
/// Includes error message into revert string on failure.
function assertApproxEqAbs(int256 left, int256 right, uint256 maxDelta, string calldata error) external pure;
/// Compares two `uint256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`.
/// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100%
/// Formats values with decimals in failure message.
function assertApproxEqRelDecimal(uint256 left, uint256 right, uint256 maxPercentDelta, uint256 decimals)
external
pure;
/// Compares two `uint256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`.
/// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100%
/// Formats values with decimals in failure message. Includes error message into revert string on failure.
function assertApproxEqRelDecimal(
uint256 left,
uint256 right,
uint256 maxPercentDelta,
uint256 decimals,
string calldata error
) external pure;
/// Compares two `int256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`.
/// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100%
/// Formats values with decimals in failure message.
function assertApproxEqRelDecimal(int256 left, int256 right, uint256 maxPercentDelta, uint256 decimals)
external
pure;
/// Compares two `int256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`.
/// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100%
/// Formats values with decimals in failure message. Includes error message into revert string on failure.
function assertApproxEqRelDecimal(
int256 left,
int256 right,
uint256 maxPercentDelta,
uint256 decimals,
string calldata error
) external pure;
/// Compares two `uint256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`.
/// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100%
function assertApproxEqRel(uint256 left, uint256 right, uint256 maxPercentDelta) external pure;
/// Compares two `uint256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`.
/// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100%
/// Includes error message into revert string on failure.
function assertApproxEqRel(uint256 left, uint256 right, uint256 maxPercentDelta, string calldata error)
external
pure;
/// Compares two `int256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`.
/// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100%
function assertApproxEqRel(int256 left, int256 right, uint256 maxPercentDelta) external pure;
/// Compares two `int256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`.
/// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100%
/// Includes error message into revert string on failure.
function assertApproxEqRel(int256 left, int256 right, uint256 maxPercentDelta, string calldata error)
external
pure;
/// Asserts that two `uint256` values are equal, formatting them with decimals in failure message.
function assertEqDecimal(uint256 left, uint256 right, uint256 decimals) external pure;
/// Asserts that two `uint256` values are equal, formatting them with decimals in failure message.
/// Includes error message into revert string on failure.
function assertEqDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure;
/// Asserts that two `int256` values are equal, formatting them with decimals in failure message.
function assertEqDecimal(int256 left, int256 right, uint256 decimals) external pure;
/// Asserts that two `int256` values are equal, formatting them with decimals in failure message.
/// Includes error message into revert string on failure.
function assertEqDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure;
/// Asserts that two `bool` values are equal.
function assertEq(bool left, bool right) external pure;
/// Asserts that two `bool` values are equal and includes error message into revert string on failure.
function assertEq(bool left, bool right, string calldata error) external pure;
/// Asserts that two `string` values are equal.
function assertEq(string calldata left, string calldata right) external pure;
/// Asserts that two `string` values are equal and includes error message into revert string on failure.
function assertEq(string calldata left, string calldata right, string calldata error) external pure;
/// Asserts that two `bytes` values are equal.
function assertEq(bytes calldata left, bytes calldata right) external pure;
/// Asserts that two `bytes` values are equal and includes error message into revert string on failure.
function assertEq(bytes calldata left, bytes calldata right, string calldata error) external pure;
/// Asserts that two arrays of `bool` values are equal.
function assertEq(bool[] calldata left, bool[] calldata right) external pure;
/// Asserts that two arrays of `bool` values are equal and includes error message into revert string on failure.
function assertEq(bool[] calldata left, bool[] calldata right, string calldata error) external pure;
/// Asserts that two arrays of `uint256 values are equal.
function assertEq(uint256[] calldata left, uint256[] calldata right) external pure;
/// Asserts that two arrays of `uint256` values are equal and includes error message into revert string on failure.
function assertEq(uint256[] calldata left, uint256[] calldata right, string calldata error) external pure;
/// Asserts that two arrays of `int256` values are equal.
function assertEq(int256[] calldata left, int256[] calldata right) external pure;
/// Asserts that two arrays of `int256` values are equal and includes error message into revert string on failure.
function assertEq(int256[] calldata left, int256[] calldata right, string calldata error) external pure;
/// Asserts that two `uint256` values are equal.
function assertEq(uint256 left, uint256 right) external pure;
/// Asserts that two arrays of `address` values are equal.
function assertEq(address[] calldata left, address[] calldata right) external pure;
/// Asserts that two arrays of `address` values are equal and includes error message into revert string on failure.
function assertEq(address[] calldata left, address[] calldata right, string calldata error) external pure;
/// Asserts that two arrays of `bytes32` values are equal.
function assertEq(bytes32[] calldata left, bytes32[] calldata right) external pure;
/// Asserts that two arrays of `bytes32` values are equal and includes error message into revert string on failure.
function assertEq(bytes32[] calldata left, bytes32[] calldata right, string calldata error) external pure;
/// Asserts that two arrays of `string` values are equal.
function assertEq(string[] calldata left, string[] calldata right) external pure;
/// Asserts that two arrays of `string` values are equal and includes error message into revert string on failure.
function assertEq(string[] calldata left, string[] calldata right, string calldata error) external pure;
/// Asserts that two arrays of `bytes` values are equal.
function assertEq(bytes[] calldata left, bytes[] calldata right) external pure;
/// Asserts that two arrays of `bytes` values are equal and includes error message into revert string on failure.
function assertEq(bytes[] calldata left, bytes[] calldata right, string calldata error) external pure;
/// Asserts that two `uint256` values are equal and includes error message into revert string on failure.
function assertEq(uint256 left, uint256 right, string calldata error) external pure;
/// Asserts that two `int256` values are equal.
function assertEq(int256 left, int256 right) external pure;
/// Asserts that two `int256` values are equal and includes error message into revert string on failure.
function assertEq(int256 left, int256 right, string calldata error) external pure;
/// Asserts that two `address` values are equal.
function assertEq(address left, address right) external pure;
/// Asserts that two `address` values are equal and includes error message into revert string on failure.
function assertEq(address left, address right, string calldata error) external pure;
/// Asserts that two `bytes32` values are equal.
function assertEq(bytes32 left, bytes32 right) external pure;
/// Asserts that two `bytes32` values are equal and includes error message into revert string on failure.
function assertEq(bytes32 left, bytes32 right, string calldata error) external pure;
/// Asserts that the given condition is false.
function assertFalse(bool condition) external pure;
/// Asserts that the given condition is false and includes error message into revert string on failure.
function assertFalse(bool condition, string calldata error) external pure;
/// Compares two `uint256` values. Expects first value to be greater than or equal to second.
/// Formats values with decimals in failure message.
function assertGeDecimal(uint256 left, uint256 right, uint256 decimals) external pure;
/// Compares two `uint256` values. Expects first value to be greater than or equal to second.
/// Formats values with decimals in failure message. Includes error message into revert string on failure.
function assertGeDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure;
/// Compares two `int256` values. Expects first value to be greater than or equal to second.
/// Formats values with decimals in failure message.
function assertGeDecimal(int256 left, int256 right, uint256 decimals) external pure;
/// Compares two `int256` values. Expects first value to be greater than or equal to second.
/// Formats values with decimals in failure message. Includes error message into revert string on failure.
function assertGeDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure;
/// Compares two `uint256` values. Expects first value to be greater than or equal to second.
function assertGe(uint256 left, uint256 right) external pure;
/// Compares two `uint256` values. Expects first value to be greater than or equal to second.
/// Includes error message into revert string on failure.
function assertGe(uint256 left, uint256 right, string calldata error) external pure;
/// Compares two `int256` values. Expects first value to be greater than or equal to second.
function assertGe(int256 left, int256 right) external pure;
/// Compares two `int256` values. Expects first value to be greater than or equal to second.
/// Includes error message into revert string on failure.
function assertGe(int256 left, int256 right, string calldata error) external pure;
/// Compares two `uint256` values. Expects first value to be greater than second.
/// Formats values with decimals in failure message.
function assertGtDecimal(uint256 left, uint256 right, uint256 decimals) external pure;
/// Compares two `uint256` values. Expects first value to be greater than second.
/// Formats values with decimals in failure message. Includes error message into revert string on failure.
function assertGtDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure;
/// Compares two `int256` values. Expects first value to be greater than second.
/// Formats values with decimals in failure message.
function assertGtDecimal(int256 left, int256 right, uint256 decimals) external pure;
/// Compares two `int256` values. Expects first value to be greater than second.
/// Formats values with decimals in failure message. Includes error message into revert string on failure.
function assertGtDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure;
/// Compares two `uint256` values. Expects first value to be greater than second.
function assertGt(uint256 left, uint256 right) external pure;
/// Compares two `uint256` values. Expects first value to be greater than second.
/// Includes error message into revert string on failure.
function assertGt(uint256 left, uint256 right, string calldata error) external pure;
/// Compares two `int256` values. Expects first value to be greater than second.
function assertGt(int256 left, int256 right) external pure;
/// Compares two `int256` values. Expects first value to be greater than second.
/// Includes error message into revert string on failure.
function assertGt(int256 left, int256 right, string calldata error) external pure;
/// Compares two `uint256` values. Expects first value to be less than or equal to second.
/// Formats values with decimals in failure message.
function assertLeDecimal(uint256 left, uint256 right, uint256 decimals) external pure;
/// Compares two `uint256` values. Expects first value to be less than or equal to second.
/// Formats values with decimals in failure message. Includes error message into revert string on failure.
function assertLeDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure;
/// Compares two `int256` values. Expects first value to be less than or equal to second.
/// Formats values with decimals in failure message.
function assertLeDecimal(int256 left, int256 right, uint256 decimals) external pure;
/// Compares two `int256` values. Expects first value to be less than or equal to second.
/// Formats values with decimals in failure message. Includes error message into revert string on failure.
function assertLeDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure;
/// Compares two `uint256` values. Expects first value to be less than or equal to second.
function assertLe(uint256 left, uint256 right) external pure;
/// Compares two `uint256` values. Expects first value to be less than or equal to second.
/// Includes error message into revert string on failure.
function assertLe(uint256 left, uint256 right, string calldata error) external pure;
/// Compares two `int256` values. Expects first value to be less than or equal to second.
function assertLe(int256 left, int256 right) external pure;
/// Compares two `int256` values. Expects first value to be less than or equal to second.
/// Includes error message into revert string on failure.
function assertLe(int256 left, int256 right, string calldata error) external pure;
/// Compares two `uint256` values. Expects first value to be less than second.
/// Formats values with decimals in failure message.
function assertLtDecimal(uint256 left, uint256 right, uint256 decimals) external pure;
/// Compares two `uint256` values. Expects first value to be less than second.
/// Formats values with decimals in failure message. Includes error message into revert string on failure.
function assertLtDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure;
/// Compares two `int256` values. Expects first value to be less than second.
/// Formats values with decimals in failure message.
function assertLtDecimal(int256 left, int256 right, uint256 decimals) external pure;
/// Compares two `int256` values. Expects first value to be less than second.
/// Formats values with decimals in failure message. Includes error message into revert string on failure.
function assertLtDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure;
/// Compares two `uint256` values. Expects first value to be less than second.
function assertLt(uint256 left, uint256 right) external pure;
/// Compares two `uint256` values. Expects first value to be less than second.
/// Includes error message into revert string on failure.
function assertLt(uint256 left, uint256 right, string calldata error) external pure;
/// Compares two `int256` values. Expects first value to be less than second.
function assertLt(int256 left, int256 right) external pure;
/// Compares two `int256` values. Expects first value to be less than second.
/// Includes error message into revert string on failure.
function assertLt(int256 left, int256 right, string calldata error) external pure;
/// Asserts that two `uint256` values are not equal, formatting them with decimals in failure message.
function assertNotEqDecimal(uint256 left, uint256 right, uint256 decimals) external pure;
/// Asserts that two `uint256` values are not equal, formatting them with decimals in failure message.
/// Includes error message into revert string on failure.
function assertNotEqDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure;
/// Asserts that two `int256` values are not equal, formatting them with decimals in failure message.
function assertNotEqDecimal(int256 left, int256 right, uint256 decimals) external pure;
/// Asserts that two `int256` values are not equal, formatting them with decimals in failure message.
/// Includes error message into revert string on failure.
function assertNotEqDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure;
/// Asserts that two `bool` values are not equal.
function assertNotEq(bool left, bool right) external pure;
/// Asserts that two `bool` values are not equal and includes error message into revert string on failure.
function assertNotEq(bool left, bool right, string calldata error) external pure;
/// Asserts that two `string` values are not equal.
function assertNotEq(string calldata left, string calldata right) external pure;
/// Asserts that two `string` values are not equal and includes error message into revert string on failure.
function assertNotEq(string calldata left, string calldata right, string calldata error) external pure;
/// Asserts that two `bytes` values are not equal.
function assertNotEq(bytes calldata left, bytes calldata right) external pure;
/// Asserts that two `bytes` values are not equal and includes error message into revert string on failure.
function assertNotEq(bytes calldata left, bytes calldata right, string calldata error) external pure;
/// Asserts that two arrays of `bool` values are not equal.
function assertNotEq(bool[] calldata left, bool[] calldata right) external pure;
/// Asserts that two arrays of `bool` values are not equal and includes error message into revert string on failure.
function assertNotEq(bool[] calldata left, bool[] calldata right, string calldata error) external pure;
/// Asserts that two arrays of `uint256` values are not equal.
function assertNotEq(uint256[] calldata left, uint256[] calldata right) external pure;
/// Asserts that two arrays of `uint256` values are not equal and includes error message into revert string on failure.
function assertNotEq(uint256[] calldata left, uint256[] calldata right, string calldata error) external pure;
/// Asserts that two arrays of `int256` values are not equal.
function assertNotEq(int256[] calldata left, int256[] calldata right) external pure;
/// Asserts that two arrays of `int256` values are not equal and includes error message into revert string on failure.
function assertNotEq(int256[] calldata left, int256[] calldata right, string calldata error) external pure;
/// Asserts that two `uint256` values are not equal.
function assertNotEq(uint256 left, uint256 right) external pure;
/// Asserts that two arrays of `address` values are not equal.
function assertNotEq(address[] calldata left, address[] calldata right) external pure;
/// Asserts that two arrays of `address` values are not equal and includes error message into revert string on failure.
function assertNotEq(address[] calldata left, address[] calldata right, string calldata error) external pure;
/// Asserts that two arrays of `bytes32` values are not equal.
function assertNotEq(bytes32[] calldata left, bytes32[] calldata right) external pure;
/// Asserts that two arrays of `bytes32` values are not equal and includes error message into revert string on failure.
function assertNotEq(bytes32[] calldata left, bytes32[] calldata right, string calldata error) external pure;
/// Asserts that two arrays of `string` values are not equal.
function assertNotEq(string[] calldata left, string[] calldata right) external pure;
/// Asserts that two arrays of `string` values are not equal and includes error message into revert string on failure.
function assertNotEq(string[] calldata left, string[] calldata right, string calldata error) external pure;
/// Asserts that two arrays of `bytes` values are not equal.
function assertNotEq(bytes[] calldata left, bytes[] calldata right) external pure;
/// Asserts that two arrays of `bytes` values are not equal and includes error message into revert string on failure.
function assertNotEq(bytes[] calldata left, bytes[] calldata right, string calldata error) external pure;
/// Asserts that two `uint256` values are not equal and includes error message into revert string on failure.
function assertNotEq(uint256 left, uint256 right, string calldata error) external pure;
/// Asserts that two `int256` values are not equal.
function assertNotEq(int256 left, int256 right) external pure;
/// Asserts that two `int256` values are not equal and includes error message into revert string on failure.
function assertNotEq(int256 left, int256 right, string calldata error) external pure;
/// Asserts that two `address` values are not equal.
function assertNotEq(address left, address right) external pure;
/// Asserts that two `address` values are not equal and includes error message into revert string on failure.
function assertNotEq(address left, address right, string calldata error) external pure;
/// Asserts that two `bytes32` values are not equal.
function assertNotEq(bytes32 left, bytes32 right) external pure;
/// Asserts that two `bytes32` values are not equal and includes error message into revert string on failure.
function assertNotEq(bytes32 left, bytes32 right, string calldata error) external pure;
/// Asserts that the given condition is true.
function assertTrue(bool condition) external pure;
/// Asserts that the given condition is true and includes error message into revert string on failure.
function assertTrue(bool condition, string calldata error) external pure;
/// If the condition is false, discard this run's fuzz inputs and generate new ones.
function assume(bool condition) external pure;
/// Writes a breakpoint to jump to in the debugger.
function breakpoint(string calldata char) external;
/// Writes a conditional breakpoint to jump to in the debugger.
function breakpoint(string calldata char, bool value) external;
/// Returns the RPC url for the given alias.
function rpcUrl(string calldata rpcAlias) external view returns (string memory json);
/// Returns all rpc urls and their aliases as structs.
function rpcUrlStructs() external view returns (Rpc[] memory urls);
/// Returns all rpc urls and their aliases `[alias, url][]`.
function rpcUrls() external view returns (string[2][] memory urls);
/// Suspends execution of the main thread for `duration` milliseconds.
function sleep(uint256 duration) external;
// ======== Toml ========
/// Checks if `key` exists in a TOML table.
function keyExistsToml(string calldata toml, string calldata key) external view returns (bool);
/// Parses a string of TOML data at `key` and coerces it to `address`.
function parseTomlAddress(string calldata toml, string calldata key) external pure returns (address);
/// Parses a string of TOML data at `key` and coerces it to `address[]`.
function parseTomlAddressArray(string calldata toml, string calldata key)
external
pure
returns (address[] memory);
/// Parses a string of TOML data at `key` and coerces it to `bool`.
function parseTomlBool(string calldata toml, string calldata key) external pure returns (bool);
/// Parses a string of TOML data at `key` and coerces it to `bool[]`.
function parseTomlBoolArray(string calldata toml, string calldata key) external pure returns (bool[] memory);
/// Parses a string of TOML data at `key` and coerces it to `bytes`.
function parseTomlBytes(string calldata toml, string calldata key) external pure returns (bytes memory);
/// Parses a string of TOML data at `key` and coerces it to `bytes32`.
function parseTomlBytes32(string calldata toml, string calldata key) external pure returns (bytes32);
/// Parses a string of TOML data at `key` and coerces it to `bytes32[]`.
function parseTomlBytes32Array(string calldata toml, string calldata key)
external
pure
returns (bytes32[] memory);
/// Parses a string of TOML data at `key` and coerces it to `bytes[]`.
function parseTomlBytesArray(string calldata toml, string calldata key) external pure returns (bytes[] memory);
/// Parses a string of TOML data at `key` and coerces it to `int256`.
function parseTomlInt(string calldata toml, string calldata key) external pure returns (int256);
/// Parses a string of TOML data at `key` and coerces it to `int256[]`.
function parseTomlIntArray(string calldata toml, string calldata key) external pure returns (int256[] memory);
/// Returns an array of all the keys in a TOML table.
function parseTomlKeys(string calldata toml, string calldata key) external pure returns (string[] memory keys);
/// Parses a string of TOML data at `key` and coerces it to `string`.
function parseTomlString(string calldata toml, string calldata key) external pure returns (string memory);
/// Parses a string of TOML data at `key` and coerces it to `string[]`.
function parseTomlStringArray(string calldata toml, string calldata key) external pure returns (string[] memory);
/// Parses a string of TOML data at `key` and coerces it to `uint256`.
function parseTomlUint(string calldata toml, string calldata key) external pure returns (uint256);
/// Parses a string of TOML data at `key` and coerces it to `uint256[]`.
function parseTomlUintArray(string calldata toml, string calldata key) external pure returns (uint256[] memory);
/// ABI-encodes a TOML table.
function parseToml(string calldata toml) external pure returns (bytes memory abiEncodedData);
/// ABI-encodes a TOML table at `key`.
function parseToml(string calldata toml, string calldata key) external pure returns (bytes memory abiEncodedData);
/// Takes serialized JSON, converts to TOML and write a serialized TOML to a file.
function writeToml(string calldata json, string calldata path) external;
/// Takes serialized JSON, converts to TOML and write a serialized TOML table to an **existing** TOML file, replacing a value with key = <value_key.>
/// This is useful to replace a specific value of a TOML file, without having to parse the entire thing.
function writeToml(string calldata json, string calldata path, string calldata valueKey) external;
// ======== Utilities ========
/// Compute the address of a contract created with CREATE2 using the given CREATE2 deployer.
function computeCreate2Address(bytes32 salt, bytes32 initCodeHash, address deployer)
external
pure
returns (address);
/// Compute the address of a contract created with CREATE2 using the default CREATE2 deployer.
function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) external pure returns (address);
/// Compute the address a contract will be deployed at for a given deployer address and nonce.
function computeCreateAddress(address deployer, uint256 nonce) external pure returns (address);
/// Derives a private key from the name, labels the account with that name, and returns the wallet.
function createWallet(string calldata walletLabel) external returns (Wallet memory wallet);
/// Generates a wallet from the private key and returns the wallet.
function createWallet(uint256 privateKey) external returns (Wallet memory wallet);
/// Generates a wallet from the private key, labels the account with that name, and returns the wallet.
function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet);
/// Derive a private key from a provided mnenomic string (or mnenomic file path)
/// at the derivation path `m/44'/60'/0'/0/{index}`.
function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey);
/// Derive a private key from a provided mnenomic string (or mnenomic file path)
/// at `{derivationPath}{index}`.
function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index)
external
pure
returns (uint256 privateKey);
/// Derive a private key from a provided mnenomic string (or mnenomic file path) in the specified language
/// at the derivation path `m/44'/60'/0'/0/{index}`.
function deriveKey(string calldata mnemonic, uint32 index, string calldata language)
external
pure
returns (uint256 privateKey);
/// Derive a private key from a provided mnenomic string (or mnenomic file path) in the specified language
/// at `{derivationPath}{index}`.
function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index, string calldata language)
external
pure
returns (uint256 privateKey);
/// Returns ENS namehash for provided string.
function ensNamehash(string calldata name) external pure returns (bytes32);
/// Gets the label for the specified address.
function getLabel(address account) external view returns (string memory currentLabel);
/// Get a `Wallet`'s nonce.
function getNonce(Wallet calldata wallet) external returns (uint64 nonce);
/// Labels an address in call traces.
function label(address account, string calldata newLabel) external;
/// Adds a private key to the local forge wallet and returns the address.
function rememberKey(uint256 privateKey) external returns (address keyAddr);
/// Signs data with a `Wallet`.
function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s);
/// Encodes a `bytes` value to a base64url string.
function toBase64URL(bytes calldata data) external pure returns (string memory);
/// Encodes a `string` value to a base64url string.
function toBase64URL(string calldata data) external pure returns (string memory);
/// Encodes a `bytes` value to a base64 string.
function toBase64(bytes calldata data) external pure returns (string memory);
/// Encodes a `string` value to a base64 string.
function toBase64(string calldata data) external pure returns (string memory);
}
/// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used
/// in tests, but it is not recommended to use these cheats in scripts.
interface Vm is VmSafe {
// ======== EVM ========
/// Returns the identifier of the currently active fork. Reverts if no fork is currently active.
function activeFork() external view returns (uint256 forkId);
/// In forking mode, explicitly grant the given address cheatcode access.
function allowCheatcodes(address account) external;
/// Sets `block.blobbasefee`
function blobBaseFee(uint256 newBlobBaseFee) external;
/// Sets the blobhashes in the transaction.
/// Not available on EVM versions before Cancun.
/// If used on unsupported EVM versions it will revert.
function blobhashes(bytes32[] calldata hashes) external;
/// Sets `block.chainid`.
function chainId(uint256 newChainId) external;
/// Clears all mocked calls.
function clearMockedCalls() external;
/// Sets `block.coinbase`.
function coinbase(address newCoinbase) external;
/// Creates a new fork with the given endpoint and the _latest_ block and returns the identifier of the fork.
function createFork(string calldata urlOrAlias) external returns (uint256 forkId);
/// Creates a new fork with the given endpoint and block and returns the identifier of the fork.
function createFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);
/// Creates a new fork with the given endpoint and at the block the given transaction was mined in,
/// replays all transaction mined in the block before the transaction, and returns the identifier of the fork.
function createFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);
/// Creates and also selects a new fork with the given endpoint and the latest block and returns the identifier of the fork.
function createSelectFork(string calldata urlOrAlias) external returns (uint256 forkId);
/// Creates and also selects a new fork with the given endpoint and block and returns the identifier of the fork.
function createSelectFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);
/// Creates and also selects new fork with the given endpoint and at the block the given transaction was mined in,
/// replays all transaction mined in the block before the transaction, returns the identifier of the fork.
function createSelectFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);
/// Sets an address' balance.
function deal(address account, uint256 newBalance) external;
/// Removes the snapshot with the given ID created by `snapshot`.
/// Takes the snapshot ID to delete.
/// Returns `true` if the snapshot was successfully deleted.
/// Returns `false` if the snapshot does not exist.
function deleteSnapshot(uint256 snapshotId) external returns (bool success);
/// Removes _all_ snapshots previously created by `snapshot`.
function deleteSnapshots() external;
/// Sets `block.difficulty`.
/// Not available on EVM versions from Paris onwards. Use `prevrandao` instead.
/// Reverts if used on unsupported EVM versions.
function difficulty(uint256 newDifficulty) external;
/// Dump a genesis JSON file's `allocs` to disk.
function dumpState(string calldata pathToStateJson) external;
/// Sets an address' code.
function etch(address target, bytes calldata newRuntimeBytecode) external;
/// Sets `block.basefee`.
function fee(uint256 newBasefee) external;
/// Gets the blockhashes from the current transaction.
/// Not available on EVM versions before Cancun.
/// If used on unsupported EVM versions it will revert.
function getBlobhashes() external view returns (bytes32[] memory hashes);
/// Returns true if the account is marked as persistent.
function isPersistent(address account) external view returns (bool persistent);
/// Load a genesis JSON file's `allocs` into the in-memory revm state.
function loadAllocs(string calldata pathToAllocsJson) external;
/// Marks that the account(s) should use persistent storage across fork swaps in a multifork setup
/// Meaning, changes made to the state of this account will be kept when switching forks.
function makePersistent(address account) external;
/// See `makePersistent(address)`.
function makePersistent(address account0, address account1) external;
/// See `makePersistent(address)`.
function makePersistent(address account0, address account1, address account2) external;
/// See `makePersistent(address)`.
function makePersistent(address[] calldata accounts) external;
/// Reverts a call to an address with specified revert data.
function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external;
/// Reverts a call to an address with a specific `msg.value`, with specified revert data.
function mockCallRevert(address callee, uint256 msgValue, bytes calldata data, bytes calldata revertData)
external;
/// Mocks a call to an address, returning specified data.
/// Calldata can either be strict or a partial match, e.g. if you only
/// pass a Solidity selector to the expected calldata, then the entire Solidity
/// function will be mocked.
function mockCall(address callee, bytes calldata data, bytes calldata returnData) external;
/// Mocks a call to an address with a specific `msg.value`, returning specified data.
/// Calldata match takes precedence over `msg.value` in case of ambiguity.
function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external;
/// Sets the *next* call's `msg.sender` to be the input address.
function prank(address msgSender) external;
/// Sets the *next* call's `msg.sender` to be the input address, and the `tx.origin` to be the second input.
function prank(address msgSender, address txOrigin) external;
/// Sets `block.prevrandao`.
/// Not available on EVM versions before Paris. Use `difficulty` instead.
/// If used on unsupported EVM versions it will revert.
function prevrandao(bytes32 newPrevrandao) external;
/// Sets `block.prevrandao`.
/// Not available on EVM versions before Paris. Use `difficulty` instead.
/// If used on unsupported EVM versions it will revert.
function prevrandao(uint256 newPrevrandao) external;
/// Reads the current `msg.sender` and `tx.origin` from state and reports if there is any active caller modification.
function readCallers() external returns (CallerMode callerMode, address msgSender, address txOrigin);
/// Resets the nonce of an account to 0 for EOAs and 1 for contract accounts.
function resetNonce(address account) external;
/// Revert the state of the EVM to a previous snapshot
/// Takes the snapshot ID to revert to.
/// Returns `true` if the snapshot was successfully reverted.
/// Returns `false` if the snapshot does not exist.
/// **Note:** This does not automatically delete the snapshot. To delete the snapshot use `deleteSnapshot`.
function revertTo(uint256 snapshotId) external returns (bool success);
/// Revert the state of the EVM to a previous snapshot and automatically deletes the snapshots
/// Takes the snapshot ID to revert to.
/// Returns `true` if the snapshot was successfully reverted and deleted.
/// Returns `false` if the snapshot does not exist.
function revertToAndDelete(uint256 snapshotId) external returns (bool success);
/// Revokes persistent status from the address, previously added via `makePersistent`.
function revokePersistent(address account) external;
/// See `revokePersistent(address)`.
function revokePersistent(address[] calldata accounts) external;
/// Sets `block.height`.
function roll(uint256 newHeight) external;
/// Updates the currently active fork to given block number
/// This is similar to `roll` but for the currently active fork.
function rollFork(uint256 blockNumber) external;
/// Updates the currently active fork to given transaction. This will `rollFork` with the number
/// of the block the transaction was mined in and replays all transaction mined before it in the block.
function rollFork(bytes32 txHash) external;
/// Updates the given fork to given block number.
function rollFork(uint256 forkId, uint256 blockNumber) external;
/// Updates the given fork to block number of the given transaction and replays all transaction mined before it in the block.
function rollFork(uint256 forkId, bytes32 txHash) external;
/// Takes a fork identifier created by `createFork` and sets the corresponding forked state as active.
function selectFork(uint256 forkId) external;
/// Sets the nonce of an account. Must be higher than the current nonce of the account.
function setNonce(address account, uint64 newNonce) external;
/// Sets the nonce of an account to an arbitrary value.
function setNonceUnsafe(address account, uint64 newNonce) external;
/// Snapshot the current state of the evm.
/// Returns the ID of the snapshot that was created.
/// To revert a snapshot use `revertTo`.
function snapshot() external returns (uint256 snapshotId);
/// Sets all subsequent calls' `msg.sender` to be the input address until `stopPrank` is called.
function startPrank(address msgSender) external;
/// Sets all subsequent calls' `msg.sender` to be the input address until `stopPrank` is called, and the `tx.origin` to be the second input.
function startPrank(address msgSender, address txOrigin) external;
/// Resets subsequent calls' `msg.sender` to be `address(this)`.
function stopPrank() external;
/// Stores a value to an address' storage slot.
function store(address target, bytes32 slot, bytes32 value) external;
/// Fetches the given transaction from the active fork and executes it on the current state.
function transact(bytes32 txHash) external;
/// Fetches the given transaction from the given fork and executes it on the current state.
function transact(uint256 forkId, bytes32 txHash) external;
/// Sets `tx.gasprice`.
function txGasPrice(uint256 newGasPrice) external;
/// Sets `block.timestamp`.
function warp(uint256 newTimestamp) external;
// ======== Testing ========
/// Expect a call to an address with the specified `msg.value` and calldata, and a *minimum* amount of gas.
function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data) external;
/// Expect given number of calls to an address with the specified `msg.value` and calldata, and a *minimum* amount of gas.
function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data, uint64 count)
external;
/// Expects a call to an address with the specified calldata.
/// Calldata can either be a strict or a partial match.
function expectCall(address callee, bytes calldata data) external;
/// Expects given number of calls to an address with the specified calldata.
function expectCall(address callee, bytes calldata data, uint64 count) external;
/// Expects a call to an address with the specified `msg.value` and calldata.
function expectCall(address callee, uint256 msgValue, bytes calldata data) external;
/// Expects given number of calls to an address with the specified `msg.value` and calldata.
function expectCall(address callee, uint256 msgValue, bytes calldata data, uint64 count) external;
/// Expect a call to an address with the specified `msg.value`, gas, and calldata.
function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data) external;
/// Expects given number of calls to an address with the specified `msg.value`, gas, and calldata.
function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external;
/// Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData.).
/// Call this function, then emit an event, then call a function. Internally after the call, we check if
/// logs were emitted in the expected order with the expected topics and data (as specified by the booleans).
function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external;
/// Same as the previous method, but also checks supplied address against emitting contract.
function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter)
external;
/// Prepare an expected log with all topic and data checks enabled.
/// Call this function, then emit an event, then call a function. Internally after the call, we check if
/// logs were emitted in the expected order with the expected topics and data.
function expectEmit() external;
/// Same as the previous method, but also checks supplied address against emitting contract.
function expectEmit(address emitter) external;
/// Expects an error on next call with any revert data.
function expectRevert() external;
/// Expects an error on next call that starts with the revert data.
function expectRevert(bytes4 revertData) external;
/// Expects an error on next call that exactly matches the revert data.
function expectRevert(bytes calldata revertData) external;
/// Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other
/// memory is written to, the test will fail. Can be called multiple times to add more ranges to the set.
function expectSafeMemory(uint64 min, uint64 max) external;
/// Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the next created subcontext.
/// If any other memory is written to, the test will fail. Can be called multiple times to add more ranges
/// to the set.
function expectSafeMemoryCall(uint64 min, uint64 max) external;
/// Marks a test as skipped. Must be called at the top of the test.
function skip(bool skipTest) external;
/// Stops all safe memory expectation in the current subcontext.
function stopExpectSafeMemory() external;
}
// src/dependencies/dss-allocator/AllocatorInstances.sol
// SPDX-FileCopyrightText: © 2023 Dai Foundation <www.daifoundation.org>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
struct AllocatorSharedInstance {
address oracle;
address roles;
address registry;
}
struct AllocatorIlkInstance {
address owner;
address vault;
address buffer;
}
// lib/dss-exec-lib/src/DssExecLib.sol
//
// DssExecLib.sol -- MakerDAO Executive Spellcrafting Library
//
// Copyright (C) 2020-2022 Dai Foundation
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
interface Initializable {
function init(bytes32) external;
}
interface Authorizable {
function rely(address) external;
function deny(address) external;
function setAuthority(address) external;
}
interface Fileable {
function file(bytes32, address) external;
function file(bytes32, uint256) external;
function file(bytes32, bytes32, uint256) external;
function file(bytes32, bytes32, address) external;
}
interface Drippable {
function drip() external returns (uint256);
function drip(bytes32) external returns (uint256);
}
interface Pricing {
function poke(bytes32) external;
}
interface ERC20 {
function decimals() external returns (uint8);
}
interface DssVat {
function hope(address) external;
function nope(address) external;
function ilks(bytes32) external returns (uint256 Art, uint256 rate, uint256 spot, uint256 line, uint256 dust);
function Line() external view returns (uint256);
function suck(address, address, uint256) external;
}
interface ClipLike {
function vat() external returns (address);
function dog() external returns (address);
function spotter() external view returns (address);
function calc() external view returns (address);
function ilk() external returns (bytes32);
}
interface DogLike {
function ilks(bytes32) external returns (address clip, uint256 chop, uint256 hole, uint256 dirt);
}
interface JoinLike {
function vat() external returns (address);
function ilk() external returns (bytes32);
function gem() external returns (address);
function dec() external returns (uint256);
function join(address, uint256) external;
function exit(address, uint256) external;
}
// Includes Median and OSM functions
interface OracleLike_0 {
function src() external view returns (address);
function lift(address[] calldata) external;
function drop(address[] calldata) external;
function setBar(uint256) external;
function kiss(address) external;
function diss(address) external;
function kiss(address[] calldata) external;
function diss(address[] calldata) external;
function orb0() external view returns (address);
function orb1() external view returns (address);
}
interface MomLike {
function setOsm(bytes32, address) external;
function setPriceTolerance(address, uint256) external;
}
interface RegistryLike_0 {
function add(address) external;
function xlip(bytes32) external view returns (address);
}
// https://github.com/makerdao/dss-chain-log
interface ChainlogLike_0 {
function setVersion(string calldata) external;
function setIPFS(string calldata) external;
function setSha256sum(string calldata) external;
function getAddress(bytes32) external view returns (address);
function setAddress(bytes32, address) external;
function removeAddress(bytes32) external;
}
interface IAMLike {
function ilks(bytes32) external view returns (uint256,uint256,uint48,uint48,uint48);
function setIlk(bytes32,uint256,uint256,uint256) external;
function remIlk(bytes32) external;
function exec(bytes32) external returns (uint256);
}
interface LerpFactoryLike {
function newLerp(bytes32 name_, address target_, bytes32 what_, uint256 startTime_, uint256 start_, uint256 end_, uint256 duration_) external returns (address);
function newIlkLerp(bytes32 name_, address target_, bytes32 ilk_, bytes32 what_, uint256 startTime_, uint256 start_, uint256 end_, uint256 duration_) external returns (address);
}
interface LerpLike {
function tick() external returns (uint256);
}
interface RwaOracleLike {
function bump(bytes32 ilk, uint256 val) external;
}
library DssExecLib {
/*****************/
/*** Constants ***/
/*****************/
address constant public LOG = 0xdA0Ab1e0017DEbCd72Be8599041a2aa3bA7e740F;
uint256 constant internal WAD = 10 ** 18;
uint256 constant internal RAY = 10 ** 27;
uint256 constant internal RAD = 10 ** 45;
uint256 constant internal THOUSAND = 10 ** 3;
uint256 constant internal MILLION = 10 ** 6;
uint256 constant internal BPS_ONE_PCT = 100;
uint256 constant internal BPS_ONE_HUNDRED_PCT = 100 * BPS_ONE_PCT;
uint256 constant internal RATES_ONE_HUNDRED_PCT = 1000000021979553151239153027;
/**********************/
/*** Math Functions ***/
/**********************/
function wdiv(uint256 x, uint256 y) internal pure returns (uint256 z) {
z = (x * WAD + y / 2) / y;
}
function rdiv(uint256 x, uint256 y) internal pure returns (uint256 z) {
z = (x * RAY + y / 2) / y;
}
/****************************/
/*** Core Address Helpers ***/
/****************************/
function dai() public view returns (address) { return getChangelogAddress("MCD_DAI"); }
function mkr() public view returns (address) { return getChangelogAddress("MCD_GOV"); }
function vat() public view returns (address) { return getChangelogAddress("MCD_VAT"); }
function cat() public view returns (address) { return getChangelogAddress("MCD_CAT"); }
function dog() public view returns (address) { return getChangelogAddress("MCD_DOG"); }
function jug() public view returns (address) { return getChangelogAddress("MCD_JUG"); }
function pot() public view returns (address) { return getChangelogAddress("MCD_POT"); }
function vow() public view returns (address) { return getChangelogAddress("MCD_VOW"); }
function end() public view returns (address) { return getChangelogAddress("MCD_END"); }
function esm() public view returns (address) { return getChangelogAddress("MCD_ESM"); }
function reg() public view returns (address) { return getChangelogAddress("ILK_REGISTRY"); }
function spotter() public view returns (address) { return getChangelogAddress("MCD_SPOT"); }
function flap() public view returns (address) { return getChangelogAddress("MCD_FLAP"); }
function flop() public view returns (address) { return getChangelogAddress("MCD_FLOP"); }
function osmMom() public view returns (address) { return getChangelogAddress("OSM_MOM"); }
function govGuard() public view returns (address) { return getChangelogAddress("GOV_GUARD"); }
function flipperMom() public view returns (address) { return getChangelogAddress("FLIPPER_MOM"); }
function clipperMom() public view returns (address) { return getChangelogAddress("CLIPPER_MOM"); }
function pauseProxy() public view returns (address) { return getChangelogAddress("MCD_PAUSE_PROXY"); }
function autoLine() public view returns (address) { return getChangelogAddress("MCD_IAM_AUTO_LINE"); }
function daiJoin() public view returns (address) { return getChangelogAddress("MCD_JOIN_DAI"); }
function lerpFab() public view returns (address) { return getChangelogAddress("LERP_FAB"); }
function clip(bytes32 _ilk) public view returns (address _clip) {
_clip = RegistryLike_0(reg()).xlip(_ilk);
}
function flip(bytes32 _ilk) public view returns (address _flip) {
_flip = RegistryLike_0(reg()).xlip(_ilk);
}
function calc(bytes32 _ilk) public view returns (address _calc) {
_calc = ClipLike(clip(_ilk)).calc();
}
function getChangelogAddress(bytes32 _key) public view returns (address) {
return ChainlogLike_0(LOG).getAddress(_key);
}
/****************************/
/*** Changelog Management ***/
/****************************/
/**
@dev Set an address in the MCD on-chain changelog.
@param _key Access key for the address (e.g. "MCD_VAT")
@param _val The address associated with the _key
*/
function setChangelogAddress(bytes32 _key, address _val) public {
ChainlogLike_0(LOG).setAddress(_key, _val);
}
/**
@dev Set version in the MCD on-chain changelog.
@param _version Changelog version (e.g. "1.1.2")
*/
function setChangelogVersion(string memory _version) public {
ChainlogLike_0(LOG).setVersion(_version);
}
/**
@dev Set IPFS hash of IPFS changelog in MCD on-chain changelog.
@param _ipfsHash IPFS hash (e.g. "QmefQMseb3AiTapiAKKexdKHig8wroKuZbmLtPLv4u2YwW")
*/
function setChangelogIPFS(string memory _ipfsHash) public {
ChainlogLike_0(LOG).setIPFS(_ipfsHash);
}
/**
@dev Set SHA256 hash in MCD on-chain changelog.
@param _SHA256Sum SHA256 hash (e.g. "e42dc9d043a57705f3f097099e6b2de4230bca9a020c797508da079f9079e35b")
*/
function setChangelogSHA256(string memory _SHA256Sum) public {
ChainlogLike_0(LOG).setSha256sum(_SHA256Sum);
}
/**********************/
/*** Authorizations ***/
/**********************/
/**
@dev Give an address authorization to perform auth actions on the contract.
@param _base The address of the contract where the authorization will be set
@param _ward Address to be authorized
*/
function authorize(address _base, address _ward) public {
Authorizable(_base).rely(_ward);
}
/**
@dev Revoke contract authorization from an address.
@param _base The address of the contract where the authorization will be revoked
@param _ward Address to be deauthorized
*/
function deauthorize(address _base, address _ward) public {
Authorizable(_base).deny(_ward);
}
/**
@dev Give an address authorization to perform auth actions on the contract.
@param _base The address of the contract with a `setAuthority` pattern
@param _authority Address to be authorized
*/
function setAuthority(address _base, address _authority) public {
Authorizable(_base).setAuthority(_authority);
}
/**
@dev Delegate vat authority to the specified address.
@param _usr Address to be authorized
*/
function delegateVat(address _usr) public {
DssVat(vat()).hope(_usr);
}
/**
@dev Revoke vat authority to the specified address.
@param _usr Address to be deauthorized
*/
function undelegateVat(address _usr) public {
DssVat(vat()).nope(_usr);
}
/******************************/
/*** OfficeHours Management ***/
/******************************/
/**
@dev Returns true if a time is within office hours range
@param _ts The timestamp to check, usually block.timestamp
@param _officeHours true if office hours is enabled.
@return true if time is in castable range
*/
function canCast(uint40 _ts, bool _officeHours) public pure returns (bool) {
if (_officeHours) {
uint256 day = (_ts / 1 days + 3) % 7;
if (day >= 5) { return false; } // Can only be cast on a weekday
uint256 hour = _ts / 1 hours % 24;
if (hour < 14 || hour >= 21) { return false; } // Outside office hours
}
return true;
}
/**
@dev Calculate the next available cast time in epoch seconds
@param _eta The scheduled time of the spell plus the pause delay
@param _ts The current timestamp, usually block.timestamp
@param _officeHours true if office hours is enabled.
@return castTime The next available cast timestamp
*/
function nextCastTime(uint40 _eta, uint40 _ts, bool _officeHours) public pure returns (uint256 castTime) {
require(_eta != 0); // "DssExecLib/invalid eta"
require(_ts != 0); // "DssExecLib/invalid ts"
castTime = _ts > _eta ? _ts : _eta; // Any day at XX:YY
if (_officeHours) {
uint256 day = (castTime / 1 days + 3) % 7;
uint256 hour = castTime / 1 hours % 24;
uint256 minute = castTime / 1 minutes % 60;
uint256 second = castTime % 60;
if (day >= 5) {
castTime += (6 - day) * 1 days; // Go to Sunday XX:YY
castTime += (24 - hour + 14) * 1 hours; // Go to 14:YY UTC Monday
castTime -= minute * 1 minutes + second; // Go to 14:00 UTC
} else {
if (hour >= 21) {
if (day == 4) castTime += 2 days; // If Friday, fast forward to Sunday XX:YY
castTime += (24 - hour + 14) * 1 hours; // Go to 14:YY UTC next day
castTime -= minute * 1 minutes + second; // Go to 14:00 UTC
} else if (hour < 14) {
castTime += (14 - hour) * 1 hours; // Go to 14:YY UTC same day
castTime -= minute * 1 minutes + second; // Go to 14:00 UTC
}
}
}
}
/**************************/
/*** Accumulating Rates ***/
/**************************/
/**
@dev Update rate accumulation for the Dai Savings Rate (DSR).
*/
function accumulateDSR() public {
Drippable(pot()).drip();
}
/**
@dev Update rate accumulation for the stability fees of a given collateral type.
@param _ilk Collateral type
*/
function accumulateCollateralStabilityFees(bytes32 _ilk) public {
Drippable(jug()).drip(_ilk);
}
/*********************/
/*** Price Updates ***/
/*********************/
/**
@dev Update price of a given collateral type.
@param _ilk Collateral type
*/
function updateCollateralPrice(bytes32 _ilk) public {
Pricing(spotter()).poke(_ilk);
}
/****************************/
/*** System Configuration ***/
/****************************/
/**
@dev Set a contract in another contract, defining the relationship (ex. set a new Calc contract in Clip)
@param _base The address of the contract where the new contract address will be filed
@param _what Name of contract to file
@param _addr Address of contract to file
*/
function setContract(address _base, bytes32 _what, address _addr) public {
Fileable(_base).file(_what, _addr);
}
/**
@dev Set a contract in another contract, defining the relationship (ex. set a new Calc contract in a Clip)
@param _base The address of the contract where the new contract address will be filed
@param _ilk Collateral type
@param _what Name of contract to file
@param _addr Address of contract to file
*/
function setContract(address _base, bytes32 _ilk, bytes32 _what, address _addr) public {
Fileable(_base).file(_ilk, _what, _addr);
}
/**
@dev Set a value in a contract, via a governance authorized File pattern.
@param _base The address of the contract where the new contract address will be filed
@param _what Name of tag for the value (e.x. "Line")
@param _amt The value to set or update
*/
function setValue(address _base, bytes32 _what, uint256 _amt) public {
Fileable(_base).file(_what, _amt);
}
/**
@dev Set an ilk-specific value in a contract, via a governance authorized File pattern.
@param _base The address of the contract where the new value will be filed
@param _ilk Collateral type
@param _what Name of tag for the value (e.x. "Line")
@param _amt The value to set or update
*/
function setValue(address _base, bytes32 _ilk, bytes32 _what, uint256 _amt) public {
Fileable(_base).file(_ilk, _what, _amt);
}
/******************************/
/*** System Risk Parameters ***/
/******************************/
// function setGlobalDebtCeiling(uint256 _amount) public { setGlobalDebtCeiling(vat(), _amount); }
/**
@dev Set the global debt ceiling. Amount will be converted to the correct internal precision.
@param _amount The amount to set in DAI (ex. 10m DAI amount == 10000000)
*/
function setGlobalDebtCeiling(uint256 _amount) public {
require(_amount < WAD); // "LibDssExec/incorrect-global-Line-precision"
setValue(vat(), "Line", _amount * RAD);
}
/**
@dev Increase the global debt ceiling by a specific amount. Amount will be converted to the correct internal precision.
@param _amount The amount to add in DAI (ex. 10m DAI amount == 10000000)
*/
function increaseGlobalDebtCeiling(uint256 _amount) public {
require(_amount < WAD); // "LibDssExec/incorrect-Line-increase-precision"
address _vat = vat();
setValue(_vat, "Line", DssVat(_vat).Line() + _amount * RAD);
}
/**
@dev Decrease the global debt ceiling by a specific amount. Amount will be converted to the correct internal precision.
@param _amount The amount to reduce in DAI (ex. 10m DAI amount == 10000000)
*/
function decreaseGlobalDebtCeiling(uint256 _amount) public {
require(_amount < WAD); // "LibDssExec/incorrect-Line-decrease-precision"
address _vat = vat();
setValue(_vat, "Line", DssVat(_vat).Line() - _amount * RAD);
}
/**
@dev Set the Dai Savings Rate. See: docs/rates.txt
@param _rate The accumulated rate (ex. 4% => 1000000001243680656318820312)
@param _doDrip `true` to accumulate interest owed
*/
function setDSR(uint256 _rate, bool _doDrip) public {
require((_rate >= RAY) && (_rate <= RATES_ONE_HUNDRED_PCT)); // "LibDssExec/dsr-out-of-bounds"
if (_doDrip) Drippable(pot()).drip();
setValue(pot(), "dsr", _rate);
}
/**
@dev Set the DAI amount for system surplus auctions. Amount will be converted to the correct internal precision.
@param _amount The amount to set in DAI (ex. 10m DAI amount == 10000000)
*/
function setSurplusAuctionAmount(uint256 _amount) public {
require(_amount < WAD); // "LibDssExec/incorrect-vow-bump-precision"
setValue(vow(), "bump", _amount * RAD);
}
/**
@dev Set the DAI amount for system surplus buffer, must be exceeded before surplus auctions start. Amount will be converted to the correct internal precision.
@param _amount The amount to set in DAI (ex. 10m DAI amount == 10000000)
*/
function setSurplusBuffer(uint256 _amount) public {
require(_amount < WAD); // "LibDssExec/incorrect-vow-hump-precision"
setValue(vow(), "hump", _amount * RAD);
}
/**
@dev Set minimum bid increase for surplus auctions. Amount will be converted to the correct internal precision.
@dev Equation used for conversion is (1 + pct / 10,000) * WAD
@param _pct_bps The pct, in basis points, to set in integer form (x100). (ex. 5% = 5 * 100 = 500)
*/
function setMinSurplusAuctionBidIncrease(uint256 _pct_bps) public {
require(_pct_bps < BPS_ONE_HUNDRED_PCT); // "LibDssExec/incorrect-flap-beg-precision"
setValue(flap(), "beg", WAD + wdiv(_pct_bps, BPS_ONE_HUNDRED_PCT));
}
/**
@dev Set bid duration for surplus auctions.
@param _duration Amount of time for bids. (in seconds)
*/
function setSurplusAuctionBidDuration(uint256 _duration) public {
setValue(flap(), "ttl", _duration);
}
/**
@dev Set total auction duration for surplus auctions.
@param _duration Amount of time for auctions. (in seconds)
*/
function setSurplusAuctionDuration(uint256 _duration) public {
setValue(flap(), "tau", _duration);
}
/**
@dev Set the number of seconds that pass before system debt is auctioned for MKR tokens.
@param _duration Duration in seconds
*/
function setDebtAuctionDelay(uint256 _duration) public {
setValue(vow(), "wait", _duration);
}
/**
@dev Set the DAI amount for system debt to be covered by each debt auction. Amount will be converted to the correct internal precision.
@param _amount The amount to set in DAI (ex. 10m DAI amount == 10000000)
*/
function setDebtAuctionDAIAmount(uint256 _amount) public {
require(_amount < WAD); // "LibDssExec/incorrect-vow-sump-precision"
setValue(vow(), "sump", _amount * RAD);
}
/**
@dev Set the starting MKR amount to be auctioned off to cover system debt in debt auctions. Amount will be converted to the correct internal precision.
@param _amount The amount to set in MKR (ex. 250 MKR amount == 250)
*/
function setDebtAuctionMKRAmount(uint256 _amount) public {
require(_amount < WAD); // "LibDssExec/incorrect-vow-dump-precision"
setValue(vow(), "dump", _amount * WAD);
}
/**
@dev Set minimum bid increase for debt auctions. Amount will be converted to the correct internal precision.
@dev Equation used for conversion is (1 + pct / 10,000) * WAD
@param _pct_bps The pct, in basis points, to set in integer form (x100). (ex. 5% = 5 * 100 = 500)
*/
function setMinDebtAuctionBidIncrease(uint256 _pct_bps) public {
require(_pct_bps < BPS_ONE_HUNDRED_PCT); // "LibDssExec/incorrect-flop-beg-precision"
setValue(flop(), "beg", WAD + wdiv(_pct_bps, BPS_ONE_HUNDRED_PCT));
}
/**
@dev Set bid duration for debt auctions.
@param _duration Amount of time for bids. (seconds)
*/
function setDebtAuctionBidDuration(uint256 _duration) public {
require(_duration < type(uint48).max); // "LibDssExec/incorrect-flop-ttl-precision"
setValue(flop(), "ttl", _duration);
}
/**
@dev Set total auction duration for debt auctions.
@param _duration Amount of time for auctions. (seconds)
*/
function setDebtAuctionDuration(uint256 _duration) public {
require(_duration < type(uint48).max); // "LibDssExec/incorrect-flop-tau-precision"
setValue(flop(), "tau", _duration);
}
/**
@dev Set the rate of increasing amount of MKR out for auction during debt auctions. Amount will be converted to the correct internal precision.
@dev MKR amount is increased by this rate every "tick" (if auction duration has passed and no one has bid on the MKR)
@dev Equation used for conversion is (1 + pct / 10,000) * WAD
@param _pct_bps The pct, in basis points, to set in integer form (x100). (ex. 5% = 5 * 100 = 500)
*/
function setDebtAuctionMKRIncreaseRate(uint256 _pct_bps) public {
require(_pct_bps < BPS_ONE_HUNDRED_PCT); // "LibDssExec/incorrect-flop-pad-precision"
setValue(flop(), "pad", WAD + wdiv(_pct_bps, BPS_ONE_HUNDRED_PCT));
}
/**
@dev Set the maximum total DAI amount that can be out for liquidation in the system at any point. Amount will be converted to the correct internal precision.
@param _amount The amount to set in DAI (ex. 250,000 DAI amount == 250000)
*/
function setMaxTotalDAILiquidationAmount(uint256 _amount) public {
require(_amount < WAD); // "LibDssExec/incorrect-dog-Hole-precision"
setValue(dog(), "Hole", _amount * RAD);
}
/**
@dev (LIQ 1.2) Set the maximum total DAI amount that can be out for liquidation in the system at any point. Amount will be converted to the correct internal precision.
@param _amount The amount to set in DAI (ex. 250,000 DAI amount == 250000)
*/
function setMaxTotalDAILiquidationAmountLEGACY(uint256 _amount) public {
require(_amount < WAD); // "LibDssExec/incorrect-cat-box-amount"
setValue(cat(), "box", _amount * RAD);
}
/**
@dev Set the duration of time that has to pass during emergency shutdown before collateral can start being claimed by DAI holders.
@param _duration Time in seconds to set for ES processing time
*/
function setEmergencyShutdownProcessingTime(uint256 _duration) public {
setValue(end(), "wait", _duration);
}
/**
@dev Set the global stability fee (is not typically used, currently is 0).
Many of the settings that change weekly rely on the rate accumulator
described at https://docs.makerdao.com/smart-contract-modules/rates-module
To check this yourself, use the following rate calculation (example 8%):
$ bc -l <<< 'scale=27; e( l(1.08)/(60 * 60 * 24 * 365) )'
A table of rates can also be found at:
https://ipfs.io/ipfs/QmefQMseb3AiTapiAKKexdKHig8wroKuZbmLtPLv4u2YwW
@param _rate The accumulated rate (ex. 4% => 1000000001243680656318820312)
*/
function setGlobalStabilityFee(uint256 _rate) public {
require((_rate >= RAY) && (_rate <= RATES_ONE_HUNDRED_PCT)); // "LibDssExec/global-stability-fee-out-of-bounds"
setValue(jug(), "base", _rate);
}
/**
@dev Set the value of DAI in the reference asset (e.g. $1 per DAI). Value will be converted to the correct internal precision.
@dev Equation used for conversion is value * RAY / 1000
@param _value The value to set as integer (x1000) (ex. $1.025 == 1025)
*/
function setDAIReferenceValue(uint256 _value) public {
require(_value < WAD); // "LibDssExec/incorrect-par-precision"
setValue(spotter(), "par", rdiv(_value, 1000));
}
/*****************************/
/*** Collateral Management ***/
/*****************************/
/**
@dev Set a collateral debt ceiling. Amount will be converted to the correct internal precision.
@param _ilk The ilk to update (ex. bytes32("ETH-A"))
@param _amount The amount to set in DAI (ex. 10m DAI amount == 10000000)
*/
function setIlkDebtCeiling(bytes32 _ilk, uint256 _amount) public {
require(_amount < WAD); // "LibDssExec/incorrect-ilk-line-precision"
setValue(vat(), _ilk, "line", _amount * RAD);
}
/**
@dev Increase a collateral debt ceiling. Amount will be converted to the correct internal precision.
@param _ilk The ilk to update (ex. bytes32("ETH-A"))
@param _amount The amount to increase in DAI (ex. 10m DAI amount == 10000000)
@param _global If true, increases the global debt ceiling by _amount
*/
function increaseIlkDebtCeiling(bytes32 _ilk, uint256 _amount, bool _global) public {
require(_amount < WAD); // "LibDssExec/incorrect-ilk-line-precision"
address _vat = vat();
(,,,uint256 line_,) = DssVat(_vat).ilks(_ilk);
setValue(_vat, _ilk, "line", line_ + _amount * RAD);
if (_global) { increaseGlobalDebtCeiling(_amount); }
}
/**
@dev Decrease a collateral debt ceiling. Amount will be converted to the correct internal precision.
@param _ilk The ilk to update (ex. bytes32("ETH-A"))
@param _amount The amount to decrease in DAI (ex. 10m DAI amount == 10000000)
@param _global If true, decreases the global debt ceiling by _amount
*/
function decreaseIlkDebtCeiling(bytes32 _ilk, uint256 _amount, bool _global) public {
require(_amount < WAD); // "LibDssExec/incorrect-ilk-line-precision"
address _vat = vat();
(,,,uint256 line_,) = DssVat(_vat).ilks(_ilk);
setValue(_vat, _ilk, "line", line_ - _amount * RAD);
if (_global) { decreaseGlobalDebtCeiling(_amount); }
}
/**
@dev Set a RWA collateral debt ceiling by specifying its new oracle price.
@param _ilk The ilk to update (ex. bytes32("ETH-A"))
@param _ceiling The new debt ceiling in natural units (e.g. set 10m DAI as 10_000_000)
@param _price The new oracle price in natural units
@dev note: _price should enable DAI to be drawn over the loan period while taking into
account the configured ink amount, interest rate and liquidation ratio
@dev note: _price * WAD should be greater than or equal to the current oracle price
*/
function setRWAIlkDebtCeiling(bytes32 _ilk, uint256 _ceiling, uint256 _price) public {
require(_price < WAD);
setIlkDebtCeiling(_ilk, _ceiling);
RwaOracleLike(getChangelogAddress("MIP21_LIQUIDATION_ORACLE")).bump(_ilk, _price * WAD);
updateCollateralPrice(_ilk);
}
/**
@dev Set the parameters for an ilk in the "MCD_IAM_AUTO_LINE" auto-line
@param _ilk The ilk to update (ex. bytes32("ETH-A"))
@param _amount The Maximum value (ex. 100m DAI amount == 100000000)
@param _gap The amount of Dai per step (ex. 5m Dai == 5000000)
@param _ttl The amount of time (in seconds)
*/
function setIlkAutoLineParameters(bytes32 _ilk, uint256 _amount, uint256 _gap, uint256 _ttl) public {
require(_amount < WAD); // "LibDssExec/incorrect-auto-line-amount-precision"
require(_gap < WAD); // "LibDssExec/incorrect-auto-line-gap-precision"
IAMLike(autoLine()).setIlk(_ilk, _amount * RAD, _gap * RAD, _ttl);
}
/**
@dev Set the debt ceiling for an ilk in the "MCD_IAM_AUTO_LINE" auto-line without updating the time values
@param _ilk The ilk to update (ex. bytes32("ETH-A"))
@param _amount The Maximum value (ex. 100m DAI amount == 100000000)
*/
function setIlkAutoLineDebtCeiling(bytes32 _ilk, uint256 _amount) public {
address _autoLine = autoLine();
(, uint256 gap, uint48 ttl,,) = IAMLike(_autoLine).ilks(_ilk);
require(gap != 0 && ttl != 0); // "LibDssExec/auto-line-not-configured"
IAMLike(_autoLine).setIlk(_ilk, _amount * RAD, uint256(gap), uint256(ttl));
}
/**
@dev Remove an ilk in the "MCD_IAM_AUTO_LINE" auto-line
@param _ilk The ilk to remove (ex. bytes32("ETH-A"))
*/
function removeIlkFromAutoLine(bytes32 _ilk) public {
IAMLike(autoLine()).remIlk(_ilk);
}
/**
@dev Set a collateral minimum vault amount. Amount will be converted to the correct internal precision.
@param _ilk The ilk to update (ex. bytes32("ETH-A"))
@param _amount The amount to set in DAI (ex. 10m DAI amount == 10000000)
*/
function setIlkMinVaultAmount(bytes32 _ilk, uint256 _amount) public {
require(_amount < WAD); // "LibDssExec/incorrect-ilk-dust-precision"
(,, uint256 _hole,) = DogLike(dog()).ilks(_ilk);
require(_amount <= _hole / RAD); // Ensure ilk.hole >= dust
setValue(vat(), _ilk, "dust", _amount * RAD);
(bool ok,) = clip(_ilk).call(abi.encodeWithSignature("upchost()")); ok;
}
/**
@dev Set a collateral liquidation penalty. Amount will be converted to the correct internal precision.
@dev Equation used for conversion is (1 + pct / 10,000) * WAD
@param _ilk The ilk to update (ex. bytes32("ETH-A"))
@param _pct_bps The pct, in basis points, to set in integer form (x100). (ex. 10.25% = 10.25 * 100 = 1025)
*/
function setIlkLiquidationPenalty(bytes32 _ilk, uint256 _pct_bps) public {
require(_pct_bps < BPS_ONE_HUNDRED_PCT); // "LibDssExec/incorrect-ilk-chop-precision"
setValue(dog(), _ilk, "chop", WAD + wdiv(_pct_bps, BPS_ONE_HUNDRED_PCT));
(bool ok,) = clip(_ilk).call(abi.encodeWithSignature("upchost()")); ok;
}
/**
@dev Set max DAI amount for liquidation per vault for collateral. Amount will be converted to the correct internal precision.
@param _ilk The ilk to update (ex. bytes32("ETH-A"))
@param _amount The amount to set in DAI (ex. 10m DAI amount == 10000000)
*/
function setIlkMaxLiquidationAmount(bytes32 _ilk, uint256 _amount) public {
require(_amount < WAD); // "LibDssExec/incorrect-ilk-hole-precision"
setValue(dog(), _ilk, "hole", _amount * RAD);
}
/**
@dev Set a collateral liquidation ratio. Amount will be converted to the correct internal precision.
@dev Equation used for conversion is pct * RAY / 10,000
@param _ilk The ilk to update (ex. bytes32("ETH-A"))
@param _pct_bps The pct, in basis points, to set in integer form (x100). (ex. 150% = 150 * 100 = 15000)
*/
function setIlkLiquidationRatio(bytes32 _ilk, uint256 _pct_bps) public {
require(_pct_bps < 10 * BPS_ONE_HUNDRED_PCT); // "LibDssExec/incorrect-ilk-mat-precision" // Fails if pct >= 1000%
require(_pct_bps >= BPS_ONE_HUNDRED_PCT); // the liquidation ratio has to be bigger or equal to 100%
setValue(spotter(), _ilk, "mat", rdiv(_pct_bps, BPS_ONE_HUNDRED_PCT));
}
/**
@dev Set an auction starting multiplier. Amount will be converted to the correct internal precision.
@dev Equation used for conversion is pct * RAY / 10,000
@param _ilk The ilk to update (ex. bytes32("ETH-A"))
@param _pct_bps The pct, in basis points, to set in integer form (x100). (ex. 1.3x starting multiplier = 130% = 13000)
*/
function setStartingPriceMultiplicativeFactor(bytes32 _ilk, uint256 _pct_bps) public {
require(_pct_bps < 10 * BPS_ONE_HUNDRED_PCT); // "LibDssExec/incorrect-ilk-mat-precision" // Fails if gt 10x
require(_pct_bps >= BPS_ONE_HUNDRED_PCT); // fail if start price is less than OSM price
setValue(clip(_ilk), "buf", rdiv(_pct_bps, BPS_ONE_HUNDRED_PCT));
}
/**
@dev Set the amout of time before an auction resets.
@param _ilk The ilk to update (ex. bytes32("ETH-A"))
@param _duration Amount of time before auction resets (in seconds).
*/
function setAuctionTimeBeforeReset(bytes32 _ilk, uint256 _duration) public {
setValue(clip(_ilk), "tail", _duration);
}
/**
@dev Percentage drop permitted before auction reset
@param _ilk The ilk to update (ex. bytes32("ETH-A"))
@param _pct_bps The pct, in basis points, of drop to permit (x100).
*/
function setAuctionPermittedDrop(bytes32 _ilk, uint256 _pct_bps) public {
require(_pct_bps < BPS_ONE_HUNDRED_PCT); // "LibDssExec/incorrect-clip-cusp-value"
setValue(clip(_ilk), "cusp", rdiv(_pct_bps, BPS_ONE_HUNDRED_PCT));
}
/**
@dev Percentage of tab to suck from vow to incentivize keepers. Amount will be converted to the correct internal precision.
@param _ilk The ilk to update (ex. bytes32("ETH-A"))
@param _pct_bps The pct, in basis points, of the tab to suck. (0.01% == 1)
*/
function setKeeperIncentivePercent(bytes32 _ilk, uint256 _pct_bps) public {
require(_pct_bps < BPS_ONE_HUNDRED_PCT); // "LibDssExec/incorrect-clip-chip-precision"
setValue(clip(_ilk), "chip", wdiv(_pct_bps, BPS_ONE_HUNDRED_PCT));
}
/**
@dev Set max DAI amount for flat rate keeper incentive. Amount will be converted to the correct internal precision.
@param _ilk The ilk to update (ex. bytes32("ETH-A"))
@param _amount The amount to set in DAI (ex. 1000 DAI amount == 1000)
*/
function setKeeperIncentiveFlatRate(bytes32 _ilk, uint256 _amount) public {
require(_amount < WAD); // "LibDssExec/incorrect-clip-tip-precision"
setValue(clip(_ilk), "tip", _amount * RAD);
}
/**
@dev Sets the circuit breaker price tolerance in the clipper mom.
This is somewhat counter-intuitive,
to accept a 25% price drop, use a value of 75%
@param _clip The clipper to set the tolerance for
@param _pct_bps The pct, in basis points, to set in integer form (x100). (ex. 5% = 5 * 100 = 500)
*/
function setLiquidationBreakerPriceTolerance(address _clip, uint256 _pct_bps) public {
require(_pct_bps < BPS_ONE_HUNDRED_PCT); // "LibDssExec/incorrect-clippermom-price-tolerance"
MomLike(clipperMom()).setPriceTolerance(_clip, rdiv(_pct_bps, BPS_ONE_HUNDRED_PCT));
}
/**
@dev Set the stability fee for a given ilk.
Many of the settings that change weekly rely on the rate accumulator
described at https://docs.makerdao.com/smart-contract-modules/rates-module
To check this yourself, use the following rate calculation (example 8%):
$ bc -l <<< 'scale=27; e( l(1.08)/(60 * 60 * 24 * 365) )'
A table of rates can also be found at:
https://ipfs.io/ipfs/QmefQMseb3AiTapiAKKexdKHig8wroKuZbmLtPLv4u2YwW
@param _ilk The ilk to update (ex. bytes32("ETH-A") )
@param _rate The accumulated rate (ex. 4% => 1000000001243680656318820312)
@param _doDrip `true` to accumulate stability fees for the collateral
*/
function setIlkStabilityFee(bytes32 _ilk, uint256 _rate, bool _doDrip) public {
require((_rate >= RAY) && (_rate <= RATES_ONE_HUNDRED_PCT)); // "LibDssExec/ilk-stability-fee-out-of-bounds"
address _jug = jug();
if (_doDrip) Drippable(_jug).drip(_ilk);
setValue(_jug, _ilk, "duty", _rate);
}
/*************************/
/*** Abacus Management ***/
/*************************/
/**
@dev Set the number of seconds from the start when the auction reaches zero price.
@dev Abacus:LinearDecrease only.
@param _calc The address of the LinearDecrease pricing contract
@param _duration Amount of time for auctions.
*/
function setLinearDecrease(address _calc, uint256 _duration) public {
setValue(_calc, "tau", _duration);
}
/**
@dev Set the number of seconds for each price step.
@dev Abacus:StairstepExponentialDecrease only.
@param _calc The address of the StairstepExponentialDecrease pricing contract
@param _duration Length of time between price drops [seconds]
@param _pct_bps Per-step multiplicative factor in basis points. (ex. 99% == 9900)
*/
function setStairstepExponentialDecrease(address _calc, uint256 _duration, uint256 _pct_bps) public {
require(_pct_bps < BPS_ONE_HUNDRED_PCT); // DssExecLib/cut-too-high
setValue(_calc, "cut", rdiv(_pct_bps, BPS_ONE_HUNDRED_PCT));
setValue(_calc, "step", _duration);
}
/**
@dev Set the number of seconds for each price step. (99% cut = 1% price drop per step)
Amounts will be converted to the correct internal precision.
@dev Abacus:ExponentialDecrease only
@param _calc The address of the ExponentialDecrease pricing contract
@param _pct_bps Per-step multiplicative factor in basis points. (ex. 99% == 9900)
*/
function setExponentialDecrease(address _calc, uint256 _pct_bps) public {
require(_pct_bps < BPS_ONE_HUNDRED_PCT); // DssExecLib/cut-too-high
setValue(_calc, "cut", rdiv(_pct_bps, BPS_ONE_HUNDRED_PCT));
}
/*************************/
/*** Oracle Management ***/
/*************************/
/**
@dev Allows an oracle to read prices from its source feeds
@param _oracle An OSM or LP oracle contract
*/
function whitelistOracleMedians(address _oracle) public {
(bool ok, bytes memory data) = _oracle.call(abi.encodeWithSignature("orb0()"));
if (ok) {
// Token is an LP oracle
address median0 = abi.decode(data, (address));
addReaderToWhitelistCall(median0, _oracle);
addReaderToWhitelistCall(OracleLike_0(_oracle).orb1(), _oracle);
} else {
// Standard OSM
addReaderToWhitelistCall(OracleLike_0(_oracle).src(), _oracle);
}
}
/**
@dev Adds an address to the OSM or Median's reader whitelist, allowing the address to read prices.
@param _oracle Oracle Security Module (OSM) or Median core contract address
@param _reader Address to add to whitelist
*/
function addReaderToWhitelist(address _oracle, address _reader) public {
OracleLike_0(_oracle).kiss(_reader);
}
/**
@dev Removes an address to the OSM or Median's reader whitelist, disallowing the address to read prices.
@param _oracle Oracle Security Module (OSM) or Median core contract address
@param _reader Address to remove from whitelist
*/
function removeReaderFromWhitelist(address _oracle, address _reader) public {
OracleLike_0(_oracle).diss(_reader);
}
/**
@dev Adds an address to the OSM or Median's reader whitelist, allowing the address to read prices.
@param _oracle OSM or Median core contract address
@param _reader Address to add to whitelist
*/
function addReaderToWhitelistCall(address _oracle, address _reader) public {
(bool ok,) = _oracle.call(abi.encodeWithSignature("kiss(address)", _reader)); ok;
}
/**
@dev Removes an address to the OSM or Median's reader whitelist, disallowing the address to read prices.
@param _oracle Oracle Security Module (OSM) or Median core contract address
@param _reader Address to remove from whitelist
*/
function removeReaderFromWhitelistCall(address _oracle, address _reader) public {
(bool ok,) = _oracle.call(abi.encodeWithSignature("diss(address)", _reader)); ok;
}
/**
@dev Sets the minimum number of valid messages from whitelisted oracle feeds needed to update median price.
@param _median Median core contract address
@param _minQuorum Minimum number of valid messages from whitelisted oracle feeds needed to update median price (NOTE: MUST BE ODD NUMBER)
*/
function setMedianWritersQuorum(address _median, uint256 _minQuorum) public {
OracleLike_0(_median).setBar(_minQuorum);
}
/**
@dev Add OSM address to OSM mom, allowing it to be frozen by governance.
@param _osm Oracle Security Module (OSM) core contract address
@param _ilk Collateral type using OSM
*/
function allowOSMFreeze(address _osm, bytes32 _ilk) public {
MomLike(osmMom()).setOsm(_ilk, _osm);
}
/*****************************/
/*** Direct Deposit Module ***/
/*****************************/
/**
@dev Sets the target rate threshold for a dai direct deposit module (d3m)
@dev Aave: Targets the variable borrow rate
@param _d3m The address of the D3M contract
@param _pct_bps Target rate in basis points. (ex. 4% == 400)
*/
function setD3MTargetInterestRate(address _d3m, uint256 _pct_bps) public {
require(_pct_bps < BPS_ONE_HUNDRED_PCT); // DssExecLib/bar-too-high
setValue(_d3m, "bar", rdiv(_pct_bps, BPS_ONE_HUNDRED_PCT));
}
/*****************************/
/*** Collateral Onboarding ***/
/*****************************/
/**
@dev Performs basic functions and sanity checks to add a new collateral type to the MCD system
@param _ilk Collateral type key code [Ex. "ETH-A"]
@param _gem Address of token contract
@param _join Address of join adapter
@param _clip Address of liquidation agent
@param _calc Address of the pricing function
@param _pip Address of price feed
*/
function addCollateralBase(
bytes32 _ilk,
address _gem,
address _join,
address _clip,
address _calc,
address _pip
) public {
// Sanity checks
address _vat = vat();
address _dog = dog();
address _spotter = spotter();
require(JoinLike(_join).vat() == _vat); // "join-vat-not-match"
require(JoinLike(_join).ilk() == _ilk); // "join-ilk-not-match"
require(JoinLike(_join).gem() == _gem); // "join-gem-not-match"
require(JoinLike(_join).dec() ==
ERC20(_gem).decimals()); // "join-dec-not-match"
require(ClipLike(_clip).vat() == _vat); // "clip-vat-not-match"
require(ClipLike(_clip).dog() == _dog); // "clip-dog-not-match"
require(ClipLike(_clip).ilk() == _ilk); // "clip-ilk-not-match"
require(ClipLike(_clip).spotter() == _spotter); // "clip-ilk-not-match"
// Set the token PIP in the Spotter
setContract(spotter(), _ilk, "pip", _pip);
// Set the ilk Clipper in the Dog
setContract(_dog, _ilk, "clip", _clip);
// Set vow in the clip
setContract(_clip, "vow", vow());
// Set the pricing function for the Clipper
setContract(_clip, "calc", _calc);
// Init ilk in Vat & Jug
Initializable(_vat).init(_ilk); // Vat
Initializable(jug()).init(_ilk); // Jug
// Allow ilk Join to modify Vat registry
authorize(_vat, _join);
// Allow ilk Join to suck dai for keepers
authorize(_vat, _clip);
// Allow the ilk Clipper to reduce the Dog hole on deal()
authorize(_dog, _clip);
// Allow Dog to kick auctions in ilk Clipper
authorize(_clip, _dog);
// Allow End to yank auctions in ilk Clipper
authorize(_clip, end());
// Authorize the ESM to execute in the clipper
authorize(_clip, esm());
// Add new ilk to the IlkRegistry
RegistryLike_0(reg()).add(_join);
}
// Complete collateral onboarding logic.
function addNewCollateral(CollateralOpts memory co) public {
// Add the collateral to the system.
addCollateralBase(co.ilk, co.gem, co.join, co.clip, co.calc, co.pip);
address clipperMom_ = clipperMom();
if (!co.isLiquidatable) {
// Disallow Dog to kick auctions in ilk Clipper
setValue(co.clip, "stopped", 3);
} else {
// Grant ClipperMom access to the ilk Clipper
authorize(co.clip, clipperMom_);
}
if(co.isOSM) { // If pip == OSM
// Allow OsmMom to access to the TOKEN OSM
authorize(co.pip, osmMom());
if (co.whitelistOSM) { // If median is src in OSM
// Whitelist OSM to read the Median data (only necessary if it is the first time the token is being added to an ilk)
whitelistOracleMedians(co.pip);
}
// Whitelist Spotter to read the OSM data (only necessary if it is the first time the token is being added to an ilk)
addReaderToWhitelist(co.pip, spotter());
// Whitelist Clipper on pip
addReaderToWhitelist(co.pip, co.clip);
// Allow the clippermom to access the feed
addReaderToWhitelist(co.pip, clipperMom_);
// Whitelist End to read the OSM data (only necessary if it is the first time the token is being added to an ilk)
addReaderToWhitelist(co.pip, end());
// Set TOKEN OSM in the OsmMom for new ilk
allowOSMFreeze(co.pip, co.ilk);
}
// Increase the global debt ceiling by the ilk ceiling
increaseGlobalDebtCeiling(co.ilkDebtCeiling);
// Set the ilk debt ceiling
setIlkDebtCeiling(co.ilk, co.ilkDebtCeiling);
// Set the hole size
setIlkMaxLiquidationAmount(co.ilk, co.maxLiquidationAmount);
// Set the ilk dust
setIlkMinVaultAmount(co.ilk, co.minVaultAmount);
// Set the ilk liquidation penalty
setIlkLiquidationPenalty(co.ilk, co.liquidationPenalty);
// Set the ilk stability fee
setIlkStabilityFee(co.ilk, co.ilkStabilityFee, true);
// Set the auction starting price multiplier
setStartingPriceMultiplicativeFactor(co.ilk, co.startingPriceFactor);
// Set the amount of time before an auction resets.
setAuctionTimeBeforeReset(co.ilk, co.auctionDuration);
// Set the allowed auction drop percentage before reset
setAuctionPermittedDrop(co.ilk, co.permittedDrop);
// Set the ilk min collateralization ratio
setIlkLiquidationRatio(co.ilk, co.liquidationRatio);
// Set the price tolerance in the liquidation circuit breaker
setLiquidationBreakerPriceTolerance(co.clip, co.breakerTolerance);
// Set a flat rate for the keeper reward
setKeeperIncentiveFlatRate(co.ilk, co.kprFlatReward);
// Set the percentage of liquidation as keeper award
setKeeperIncentivePercent(co.ilk, co.kprPctReward);
// Update ilk spot value in Vat
updateCollateralPrice(co.ilk);
}
/***************/
/*** Payment ***/
/***************/
/**
@dev Send a payment in ERC20 DAI from the surplus buffer.
@param _target The target address to send the DAI to.
@param _amount The amount to send in DAI (ex. 10m DAI amount == 10000000)
*/
function sendPaymentFromSurplusBuffer(address _target, uint256 _amount) public {
require(_amount < WAD); // "LibDssExec/incorrect-ilk-line-precision"
DssVat(vat()).suck(vow(), address(this), _amount * RAD);
JoinLike(daiJoin()).exit(_target, _amount * WAD);
}
/************/
/*** Misc ***/
/************/
/**
@dev Initiate linear interpolation on an administrative value over time.
@param _name The label for this lerp instance
@param _target The target contract
@param _what The target parameter to adjust
@param _startTime The time for this lerp
@param _start The start value for the target parameter
@param _end The end value for the target parameter
@param _duration The duration of the interpolation
*/
function linearInterpolation(bytes32 _name, address _target, bytes32 _what, uint256 _startTime, uint256 _start, uint256 _end, uint256 _duration) public returns (address) {
address lerp = LerpFactoryLike(lerpFab()).newLerp(_name, _target, _what, _startTime, _start, _end, _duration);
Authorizable(_target).rely(lerp);
LerpLike(lerp).tick();
return lerp;
}
/**
@dev Initiate linear interpolation on an administrative value over time.
@param _name The label for this lerp instance
@param _target The target contract
@param _ilk The ilk to target
@param _what The target parameter to adjust
@param _startTime The time for this lerp
@param _start The start value for the target parameter
@param _end The end value for the target parameter
@param _duration The duration of the interpolation
*/
function linearInterpolation(bytes32 _name, address _target, bytes32 _ilk, bytes32 _what, uint256 _startTime, uint256 _start, uint256 _end, uint256 _duration) public returns (address) {
address lerp = LerpFactoryLike(lerpFab()).newIlkLerp(_name, _target, _ilk, _what, _startTime, _start, _end, _duration);
Authorizable(_target).rely(lerp);
LerpLike(lerp).tick();
return lerp;
}
}
// lib/dss-test/lib/forge-std/src/StdJson.sol
// Helpers for parsing and writing JSON files
// To parse:
// ```
// using stdJson for string;
// string memory json = vm.readFile("<some_path>");
// json.readUint("<json_path>");
// ```
// To write:
// ```
// using stdJson for string;
// string memory json = "json";
// json.serialize("a", uint256(123));
// string memory semiFinal = json.serialize("b", string("test"));
// string memory finalJson = json.serialize("c", semiFinal);
// finalJson.write("<some_path>");
// ```
library stdJson {
VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code")))));
function parseRaw(string memory json, string memory key) internal pure returns (bytes memory) {
return vm.parseJson(json, key);
}
function readUint(string memory json, string memory key) internal pure returns (uint256) {
return vm.parseJsonUint(json, key);
}
function readUintArray(string memory json, string memory key) internal pure returns (uint256[] memory) {
return vm.parseJsonUintArray(json, key);
}
function readInt(string memory json, string memory key) internal pure returns (int256) {
return vm.parseJsonInt(json, key);
}
function readIntArray(string memory json, string memory key) internal pure returns (int256[] memory) {
return vm.parseJsonIntArray(json, key);
}
function readBytes32(string memory json, string memory key) internal pure returns (bytes32) {
return vm.parseJsonBytes32(json, key);
}
function readBytes32Array(string memory json, string memory key) internal pure returns (bytes32[] memory) {
return vm.parseJsonBytes32Array(json, key);
}
function readString(string memory json, string memory key) internal pure returns (string memory) {
return vm.parseJsonString(json, key);
}
function readStringArray(string memory json, string memory key) internal pure returns (string[] memory) {
return vm.parseJsonStringArray(json, key);
}
function readAddress(string memory json, string memory key) internal pure returns (address) {
return vm.parseJsonAddress(json, key);
}
function readAddressArray(string memory json, string memory key) internal pure returns (address[] memory) {
return vm.parseJsonAddressArray(json, key);
}
function readBool(string memory json, string memory key) internal pure returns (bool) {
return vm.parseJsonBool(json, key);
}
function readBoolArray(string memory json, string memory key) internal pure returns (bool[] memory) {
return vm.parseJsonBoolArray(json, key);
}
function readBytes(string memory json, string memory key) internal pure returns (bytes memory) {
return vm.parseJsonBytes(json, key);
}
function readBytesArray(string memory json, string memory key) internal pure returns (bytes[] memory) {
return vm.parseJsonBytesArray(json, key);
}
function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) {
return vm.serializeJson(jsonKey, rootObject);
}
function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) {
return vm.serializeBool(jsonKey, key, value);
}
function serialize(string memory jsonKey, string memory key, bool[] memory value)
internal
returns (string memory)
{
return vm.serializeBool(jsonKey, key, value);
}
function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) {
return vm.serializeUint(jsonKey, key, value);
}
function serialize(string memory jsonKey, string memory key, uint256[] memory value)
internal
returns (string memory)
{
return vm.serializeUint(jsonKey, key, value);
}
function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) {
return vm.serializeInt(jsonKey, key, value);
}
function serialize(string memory jsonKey, string memory key, int256[] memory value)
internal
returns (string memory)
{
return vm.serializeInt(jsonKey, key, value);
}
function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) {
return vm.serializeAddress(jsonKey, key, value);
}
function serialize(string memory jsonKey, string memory key, address[] memory value)
internal
returns (string memory)
{
return vm.serializeAddress(jsonKey, key, value);
}
function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) {
return vm.serializeBytes32(jsonKey, key, value);
}
function serialize(string memory jsonKey, string memory key, bytes32[] memory value)
internal
returns (string memory)
{
return vm.serializeBytes32(jsonKey, key, value);
}
function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) {
return vm.serializeBytes(jsonKey, key, value);
}
function serialize(string memory jsonKey, string memory key, bytes[] memory value)
internal
returns (string memory)
{
return vm.serializeBytes(jsonKey, key, value);
}
function serialize(string memory jsonKey, string memory key, string memory value)
internal
returns (string memory)
{
return vm.serializeString(jsonKey, key, value);
}
function serialize(string memory jsonKey, string memory key, string[] memory value)
internal
returns (string memory)
{
return vm.serializeString(jsonKey, key, value);
}
function write(string memory jsonKey, string memory path) internal {
vm.writeJson(jsonKey, path);
}
function write(string memory jsonKey, string memory path, string memory valueKey) internal {
vm.writeJson(jsonKey, path, valueKey);
}
}
// lib/dss-exec-lib/src/DssAction.sol
//
// DssAction.sol -- DSS Executive Spell Actions
//
// Copyright (C) 2020-2022 Dai Foundation
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
interface OracleLike_1 {
function src() external view returns (address);
}
abstract contract DssAction {
using DssExecLib for *;
// Modifier used to limit execution time when office hours is enabled
modifier limited {
require(DssExecLib.canCast(uint40(block.timestamp), officeHours()), "Outside office hours");
_;
}
// Office Hours defaults to true by default.
// To disable office hours, override this function and
// return false in the inherited action.
function officeHours() public view virtual returns (bool) {
return true;
}
// DssExec calls execute. We limit this function subject to officeHours modifier.
function execute() external limited {
actions();
}
// DssAction developer must override `actions()` and place all actions to be called inside.
// The DssExec function will call this subject to the officeHours limiter
// By keeping this function public we allow simulations of `execute()` on the actions outside of the cast time.
function actions() public virtual;
// Provides a descriptive tag for bot consumption
// This should be modified weekly to provide a summary of the actions
// Hash: seth keccak -- "$(wget https://<executive-vote-canonical-post> -q -O - 2>/dev/null)"
function description() external view virtual returns (string memory);
// Returns the next available cast time
function nextCastTime(uint256 eta) external view returns (uint256 castTime) {
require(eta <= type(uint40).max);
castTime = DssExecLib.nextCastTime(uint40(eta), uint40(block.timestamp), officeHours());
}
}
// lib/dss-test/lib/dss-interfaces/src/Interfaces.sol
// MIP21 Abstracts
// Partial DSS Abstracts
// lib/dss-test/src/GodMode.sol
// SPDX-FileCopyrightText: © 2022 Dai Foundation <www.daifoundation.org>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
library GodMode {
address constant public VM_ADDR = address(bytes20(uint160(uint256(keccak256('hevm cheat code')))));
function vm() internal pure returns (Vm) {
return Vm(VM_ADDR);
}
/// @dev Set the ward for `base` for the specified `target`
/// Note this only works for contracts compiled under Solidity. Vyper contracts use a different storage structure for maps.
/// See https://twitter.com/msolomon44/status/1420137730009300992?t=WO2052xM3AzUCL7o7Pfkow&s=19
function setWard(address base, address target, uint256 val) internal {
// Edge case - ward is already set
if (WardsAbstract(base).wards(target) == val) return;
for (int i = 0; i < 100; i++) {
// Scan the storage for the ward storage slot
bytes32 prevValue = vm().load(
address(base),
keccak256(abi.encode(target, uint256(i)))
);
vm().store(
address(base),
keccak256(abi.encode(target, uint256(i))),
bytes32(uint256(val))
);
if (WardsAbstract(base).wards(target) == val) {
// Found it
return;
} else {
// Keep going after restoring the original value
vm().store(
address(base),
keccak256(abi.encode(target, uint256(i))),
prevValue
);
}
}
// We have failed if we reach here
revert("Could not give auth access");
}
/// @dev Set the ward for `base` for the specified `target`
/// Note this only works for contracts compiled under Solidity. Vyper contracts use a different storage structure for maps.
/// See https://twitter.com/msolomon44/status/1420137730009300992?t=WO2052xM3AzUCL7o7Pfkow&s=19
function setWard(WardsAbstract base, address target, uint256 val) internal {
setWard(address(base), target, val);
}
/// @dev Set the ward for `base` for the specified `target`
/// Note this only works for contracts compiled under Solidity. Vyper contracts use a different storage structure for maps.
/// See https://twitter.com/msolomon44/status/1420137730009300992?t=WO2052xM3AzUCL7o7Pfkow&s=19
function setWard(VatAbstract base, address target, uint256 val) internal {
setWard(address(base), target, val);
}
/// @dev Sets the balance for `who` to `amount` for `token`.
function setBalance(address token, address who, uint256 amount) internal {
// Edge case - balance is already set for some reason
if (DSTokenAbstract(token).balanceOf(who) == amount) return;
for (uint256 i = 0; i < 200; i++) {
// Scan the storage for the solidity-style balance storage slot
{
bytes32 prevValue = vm().load(
token,
keccak256(abi.encode(who, uint256(i)))
);
vm().store(
token,
keccak256(abi.encode(who, uint256(i))),
bytes32(amount)
);
if (DSTokenAbstract(token).balanceOf(who) == amount) {
// Found it
return;
} else {
// Keep going after restoring the original value
vm().store(
token,
keccak256(abi.encode(who, uint256(i))),
prevValue
);
}
}
// Vyper-style storage layout for maps
{
bytes32 prevValue = vm().load(
token,
keccak256(abi.encode(uint256(i), who))
);
vm().store(
token,
keccak256(abi.encode(uint256(i), who)),
bytes32(amount)
);
if (DSTokenAbstract(token).balanceOf(who) == amount) {
// Found it
return;
} else {
// Keep going after restoring the original value
vm().store(
token,
keccak256(abi.encode(uint256(i), who)),
prevValue
);
}
}
}
// We have failed if we reach here
revert("Could not give tokens");
}
/// @dev Sets the balance for `who` to `amount` for `token`.
function setBalance(DSTokenAbstract token, address who, uint256 amount) internal {
setBalance(address(token), who, amount);
}
/// @dev Sets the balance for `who` to `amount` for `token`.
function setBalance(DaiAbstract token, address who, uint256 amount) internal {
setBalance(address(token), who, amount);
}
}
// lib/dss-test/src/ScriptTools.sol
// SPDX-FileCopyrightText: © 2022 Dai Foundation <www.daifoundation.org>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
/**
* @title Script Tools
* @dev Contains opinionated tools used in scripts.
*/
library ScriptTools {
VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code")))));
string internal constant DEFAULT_DELIMITER = ",";
string internal constant DELIMITER_OVERRIDE = "DSSTEST_ARRAY_DELIMITER";
string internal constant EXPORT_JSON_KEY = "EXPORTS";
function getRootChainId() internal view returns (uint256) {
return vm.envUint("FOUNDRY_ROOT_CHAINID");
}
function readInput(string memory name) internal view returns (string memory) {
string memory root = vm.projectRoot();
return readInput(root, name);
}
function readInput(string memory root, string memory name) internal view returns (string memory) {
string memory chainInputFolder = string(abi.encodePacked("/script/input/", vm.toString(getRootChainId()), "/"));
return vm.readFile(string(abi.encodePacked(root, chainInputFolder, name, ".json")));
}
function readOutput(string memory name, uint256 timestamp) internal view returns (string memory) {
string memory root = vm.projectRoot();
string memory chainOutputFolder = string(abi.encodePacked("/script/output/", vm.toString(getRootChainId()), "/"));
return vm.readFile(string(abi.encodePacked(root, chainOutputFolder, name, "-", vm.toString(timestamp), ".json")));
}
function readOutput(string memory name) internal view returns (string memory) {
string memory root = vm.projectRoot();
string memory chainOutputFolder = string(abi.encodePacked("/script/output/", vm.toString(getRootChainId()), "/"));
return vm.readFile(string(abi.encodePacked(root, chainOutputFolder, name, "-latest.json")));
}
/**
* @notice Use standard environment variables to load config.
* @dev Will first check FOUNDRY_SCRIPT_CONFIG_TEXT for raw json text.
* Falls back to FOUNDRY_SCRIPT_CONFIG for a standard file definition.
* Finally will fall back to the given string `name`.
* @param name The default config file to load if no environment variables are set.
* @return config The raw json text of the config.
*/
function loadConfig(string memory name) internal view returns (string memory config) {
config = vm.envOr("FOUNDRY_SCRIPT_CONFIG_TEXT", string(""));
if (eq(config, "")) {
config = readInput(vm.envOr("FOUNDRY_SCRIPT_CONFIG", name));
}
}
/**
* @notice Use standard environment variables to load config.
* @dev Will first check FOUNDRY_SCRIPT_CONFIG_TEXT for raw json text.
* Falls back to FOUNDRY_SCRIPT_CONFIG for a standard file definition.
* Finally will revert if no environment variables are set.
* @return config The raw json text of the config.
*/
function loadConfig() internal view returns (string memory config) {
config = vm.envOr("FOUNDRY_SCRIPT_CONFIG_TEXT", string(""));
if (eq(config, "")) {
config = readInput(vm.envString("FOUNDRY_SCRIPT_CONFIG"));
}
}
/**
* @notice Use standard environment variables to load dependencies.
* @dev Will first check FOUNDRY_SCRIPT_DEPS_TEXT for raw json text.
* Falls back to FOUNDRY_SCRIPT_DEPS for a standard file definition.
* Finally will fall back to the given string `name`.
* @param name The default dependency file to load if no environment variables are set.
* @return dependencies The raw json text of the dependencies.
*/
function loadDependencies(string memory name) internal view returns (string memory dependencies) {
dependencies = vm.envOr("FOUNDRY_SCRIPT_DEPS_TEXT", string(""));
if (eq(dependencies, "")) {
dependencies = readOutput(vm.envOr("FOUNDRY_SCRIPT_DEPS", name));
}
}
/**
* @notice Use standard environment variables to load dependencies.
* @dev Will first check FOUNDRY_SCRIPT_DEPS_TEXT for raw json text.
* Falls back to FOUNDRY_SCRIPT_DEPS for a standard file definition.
* Finally will revert if no environment variables are set.
* @return dependencies The raw json text of the dependencies.
*/
function loadDependencies() internal view returns (string memory dependencies) {
dependencies = vm.envOr("FOUNDRY_SCRIPT_DEPS_TEXT", string(""));
if (eq(dependencies, "")) {
dependencies = readOutput(vm.envString("FOUNDRY_SCRIPT_DEPS"));
}
}
/**
* @notice Used to export important contracts to higher level deploy scripts.
* Note waiting on Foundry to have better primitives, but roll our own for now.
* @dev Requires FOUNDRY_EXPORTS_NAME to be set.
* @param label The label of the address.
* @param addr The address to export.
*/
function exportContract(string memory label, address addr) internal {
exportContract(vm.envString("FOUNDRY_EXPORTS_NAME"), label, addr);
}
/**
* @notice Used to export important contracts to higher level deploy scripts.
* Note waiting on Foundry to have better primitives, but roll our own for now.
* @dev Set FOUNDRY_EXPORTS_NAME to override the name of the json file.
* @param name The name to give the json file.
* @param label The label of the address.
* @param addr The address to export.
*/
function exportContract(string memory name, string memory label, address addr) internal {
name = vm.envOr("FOUNDRY_EXPORTS_NAME", name);
string memory json = vm.serializeAddress(string(abi.encodePacked(EXPORT_JSON_KEY, "_", name)), label, addr);
_doExport(name, json);
}
/**
* @notice Used to export important contracts to higher level deploy scripts. Specifically,
* this function exports an array of contracts under the same key (label).
* Note waiting on Foundry to have better primitives, but roll our own for now.
* @dev Set FOUNDRY_EXPORTS_NAME to override the name of the json file.
* @param name The name to give the json file.
* @param label The label of the addresses.
* @param addr The addresses to export.
*/
function exportContracts(string memory name, string memory label, address[] memory addr) internal {
name = vm.envOr("FOUNDRY_EXPORTS_NAME", name);
string memory json = vm.serializeAddress(string(abi.encodePacked(EXPORT_JSON_KEY, "_", name)), label, addr);
_doExport(name, json);
}
/**
* @notice Used to export important values to higher level deploy scripts.
* Note waiting on Foundry to have better primitives, but roll our own for now.
* @dev Requires FOUNDRY_EXPORTS_NAME to be set.
* @param label The label of the address.
* @param val The value to export.
*/
function exportValue(string memory label, uint256 val) internal {
exportValue(vm.envString("FOUNDRY_EXPORTS_NAME"), label, val);
}
/**
* @notice Used to export important values to higher level deploy scripts.
* Note waiting on Foundry to have better primitives, but roll our own for now.
* @dev Set FOUNDRY_EXPORTS_NAME to override the name of the json file.
* @param name The name to give the json file.
* @param label The label of the address.
* @param val The value to export.
*/
function exportValue(string memory name, string memory label, uint256 val) internal {
name = vm.envOr("FOUNDRY_EXPORTS_NAME", name);
string memory json = vm.serializeUint(string(abi.encodePacked(EXPORT_JSON_KEY, "_", name)), label, val);
_doExport(name, json);
}
/**
* @notice Used to export important values to higher level deploy scripts.
* Note waiting on Foundry to have better primitives, but roll our own for now.
* @dev Requires FOUNDRY_EXPORTS_NAME to be set.
* @param label The label of the address.
* @param val The value to export.
*/
function exportValue(string memory label, string memory val) internal {
exportValue(vm.envString("FOUNDRY_EXPORTS_NAME"), label, val);
}
/**
* @notice Used to export important values to higher level deploy scripts.
* Note waiting on Foundry to have better primitives, but roll our own for now.
* @dev Set FOUNDRY_EXPORTS_NAME to override the name of the json file.
* @param name The name to give the json file.
* @param label The label of the address.
* @param val The value to export.
*/
function exportValue(string memory name, string memory label, string memory val) internal {
name = vm.envOr("FOUNDRY_EXPORTS_NAME", name);
string memory json = vm.serializeString(string(abi.encodePacked(EXPORT_JSON_KEY, "_", name)), label, val);
_doExport(name, json);
}
/**
* @dev Common logic to export JSON files.
* @param name The name to give the json file
* @param json The serialized json object to export.
*/
function _doExport(string memory name, string memory json) internal {
string memory root = vm.projectRoot();
string memory chainOutputFolder = string(abi.encodePacked("/script/output/", vm.toString(getRootChainId()), "/"));
vm.writeJson(json, string(abi.encodePacked(root, chainOutputFolder, name, "-", vm.toString(block.timestamp), ".json")));
if (vm.envOr("FOUNDRY_EXPORTS_OVERWRITE_LATEST", false)) {
vm.writeJson(json, string(abi.encodePacked(root, chainOutputFolder, name, "-latest.json")));
}
}
/**
* @notice It's common to define strings as bytes32 (such as for ilks)
*/
function stringToBytes32(string memory source) internal pure returns (bytes32 result) {
bytes memory emptyStringTest = bytes(source);
if (emptyStringTest.length == 0) {
return 0x0;
}
assembly {
result := mload(add(source, 32))
}
}
/**
* @notice Convert an ilk to a chainlog key by replacing all dashes with underscores.
* Ex) Convert "ETH-A" to "ETH_A"
*/
function ilkToChainlogFormat(bytes32 ilk) internal pure returns (string memory) {
uint256 len = 0;
for (; len < 32; len++) {
if (uint8(ilk[len]) == 0x00) break;
}
bytes memory result = new bytes(len);
for (uint256 i = 0; i < len; i++) {
uint8 b = uint8(ilk[i]);
if (b == 0x2d) result[i] = bytes1(0x5f);
else result[i] = bytes1(b);
}
return string(result);
}
function eq(string memory a, string memory b) internal pure returns (bool) {
return keccak256(bytes(a)) == keccak256(bytes(b));
}
function switchOwner(address base, address deployer, address newOwner) internal {
if (deployer == newOwner) return;
require(WardsAbstract(base).wards(deployer) == 1, "deployer-not-authed");
WardsAbstract(base).rely(newOwner);
WardsAbstract(base).deny(deployer);
}
// Read config variable, but allow for an environment variable override
function readUint(string memory json, string memory key, string memory envKey) internal view returns (uint256) {
return vm.envOr(envKey, stdJson.readUint(json, key));
}
function readUintArray(string memory json, string memory key, string memory envKey) internal view returns (uint256[] memory) {
return vm.envOr(envKey, vm.envOr(DELIMITER_OVERRIDE, DEFAULT_DELIMITER), stdJson.readUintArray(json, key));
}
function readInt(string memory json, string memory key, string memory envKey) internal view returns (int256) {
return vm.envOr(envKey, stdJson.readInt(json, key));
}
function readIntArray(string memory json, string memory key, string memory envKey) internal view returns (int256[] memory) {
return vm.envOr(envKey, vm.envOr(DELIMITER_OVERRIDE, DEFAULT_DELIMITER), stdJson.readIntArray(json, key));
}
function readBytes32(string memory json, string memory key, string memory envKey) internal view returns (bytes32) {
return vm.envOr(envKey, stdJson.readBytes32(json, key));
}
function readBytes32Array(string memory json, string memory key, string memory envKey) internal view returns (bytes32[] memory) {
return vm.envOr(envKey, vm.envOr(DELIMITER_OVERRIDE, DEFAULT_DELIMITER), stdJson.readBytes32Array(json, key));
}
function readString(string memory json, string memory key, string memory envKey) internal view returns (string memory) {
return vm.envOr(envKey, stdJson.readString(json, key));
}
function readStringArray(string memory json, string memory key, string memory envKey) internal view returns (string[] memory) {
return vm.envOr(envKey, vm.envOr(DELIMITER_OVERRIDE, DEFAULT_DELIMITER), stdJson.readStringArray(json, key));
}
function readAddress(string memory json, string memory key, string memory envKey) internal view returns (address) {
return vm.envOr(envKey, stdJson.readAddress(json, key));
}
function readAddressArray(string memory json, string memory key, string memory envKey) internal view returns (address[] memory) {
return vm.envOr(envKey, vm.envOr(DELIMITER_OVERRIDE, DEFAULT_DELIMITER), stdJson.readAddressArray(json, key));
}
function readBool(string memory json, string memory key, string memory envKey) internal view returns (bool) {
return vm.envOr(envKey, stdJson.readBool(json, key));
}
function readBoolArray(string memory json, string memory key, string memory envKey) internal view returns (bool[] memory) {
return vm.envOr(envKey, vm.envOr(DELIMITER_OVERRIDE, DEFAULT_DELIMITER), stdJson.readBoolArray(json, key));
}
function readBytes(string memory json, string memory key, string memory envKey) internal view returns (bytes memory) {
return vm.envOr(envKey, stdJson.readBytes(json, key));
}
function readBytesArray(string memory json, string memory key, string memory envKey) internal view returns (bytes[] memory) {
return vm.envOr(envKey, vm.envOr(DELIMITER_OVERRIDE, DEFAULT_DELIMITER), stdJson.readBytesArray(json, key));
}
}
// lib/dss-test/src/MCD.sol
// SPDX-FileCopyrightText: © 2022 Dai Foundation <www.daifoundation.org>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
contract DSValue {
bool has;
bytes32 val;
function peek() public view returns (bytes32, bool) {
return (val,has);
}
function read() external view returns (bytes32) {
bytes32 wut; bool haz;
(wut, haz) = peek();
require(haz, "haz-not");
return wut;
}
function poke(bytes32 wut) external {
val = wut;
has = true;
}
function void() external {
val = bytes32(0);
has = false;
}
}
struct DssInstance {
ChainlogAbstract chainlog;
VatAbstract vat;
DaiJoinAbstract daiJoin;
DaiAbstract dai;
VowAbstract vow;
DogAbstract dog;
PotAbstract pot;
JugAbstract jug;
SpotAbstract spotter;
EndAbstract end;
CureAbstract cure;
FlapAbstract flap;
FlopAbstract flop;
ESMAbstract esm;
}
struct DssIlkInstance {
DSTokenAbstract gem;
OsmAbstract pip;
GemJoinAbstract join;
ClipAbstract clip;
}
library MCD {
uint256 constant WAD = 10 ** 18;
uint256 constant RAY = 10 ** 27;
uint256 constant RAD = 10 ** 45;
function getAddressOrNull(DssInstance memory dss, bytes32 key) internal view returns (address) {
try dss.chainlog.getAddress(key) returns (address a) {
return a;
} catch {
return address(0);
}
}
function loadFromChainlog(address chainlog) internal view returns (DssInstance memory dss) {
return loadFromChainlog(ChainlogAbstract(chainlog));
}
function loadFromChainlog(ChainlogAbstract chainlog) internal view returns (DssInstance memory dss) {
dss.chainlog = chainlog;
dss.vat = VatAbstract(getAddressOrNull(dss, "MCD_VAT"));
dss.daiJoin = DaiJoinAbstract(getAddressOrNull(dss, "MCD_JOIN_DAI"));
dss.dai = DaiAbstract(getAddressOrNull(dss, "MCD_DAI"));
dss.vow = VowAbstract(getAddressOrNull(dss, "MCD_VOW"));
dss.dog = DogAbstract(getAddressOrNull(dss, "MCD_DOG"));
dss.pot = PotAbstract(getAddressOrNull(dss, "MCD_POT"));
dss.jug = JugAbstract(getAddressOrNull(dss, "MCD_JUG"));
dss.spotter = SpotAbstract(getAddressOrNull(dss, "MCD_SPOT"));
dss.end = EndAbstract(getAddressOrNull(dss, "MCD_END"));
dss.cure = CureAbstract(getAddressOrNull(dss, "MCD_CURE"));
dss.flap = FlapAbstract(getAddressOrNull(dss, "MCD_FLAP"));
dss.flop = FlopAbstract(getAddressOrNull(dss, "MCD_FLOP"));
dss.esm = ESMAbstract(getAddressOrNull(dss, "MCD_ESM"));
}
function bytesToBytes32(bytes memory b) private pure returns (bytes32) {
bytes32 out;
for (uint256 i = 0; i < b.length; i++) {
out |= bytes32(b[i] & 0xFF) >> (i * 8);
}
return out;
}
function getIlk(DssInstance memory dss, string memory gem, string memory variant) internal view returns (DssIlkInstance memory) {
return DssIlkInstance(
DSTokenAbstract(getAddressOrNull(dss, bytesToBytes32(bytes(gem)))),
OsmAbstract(getAddressOrNull(dss, bytesToBytes32(abi.encodePacked("PIP_", gem)))),
GemJoinAbstract(getAddressOrNull(dss, bytesToBytes32(abi.encodePacked("MCD_JOIN_", gem, "_", variant)))),
ClipAbstract(getAddressOrNull(dss, bytesToBytes32(abi.encodePacked("MCD_CLIP_", gem, "_", variant))))
);
}
/// @dev Initialize a dummy ilk with a $1 DSValue pip without liquidations
function initIlk(
DssInstance memory dss,
bytes32 ilk
) internal {
DSValue pip = new DSValue();
pip.poke(bytes32(WAD));
initIlk(dss, ilk, address(0), address(pip));
}
/// @dev Initialize an ilk with a $1 DSValue pip without liquidations
function initIlk(
DssInstance memory dss,
bytes32 ilk,
address join
) internal {
DSValue pip = new DSValue();
pip.poke(bytes32(WAD));
initIlk(dss, ilk, join, address(pip));
}
/// @dev Initialize an ilk without liquidations
function initIlk(
DssInstance memory dss,
bytes32 ilk,
address join,
address pip
) internal {
dss.vat.init(ilk);
dss.jug.init(ilk);
dss.vat.rely(join);
dss.spotter.file(ilk, "pip", pip);
dss.spotter.file(ilk, "mat", RAY);
dss.spotter.poke(ilk);
}
/// @dev Initialize an ilk with liquidations
function initIlk(
DssInstance memory dss,
bytes32 ilk,
address join,
address pip,
address clip,
address clipCalc
) internal {
initIlk(dss, ilk, join, pip);
// TODO liquidations
clip; clipCalc;
}
/// @dev Give who a ward on all core contracts
function giveAdminAccess(DssInstance memory dss, address who) internal {
if (address(dss.vat) != address(0)) GodMode.setWard(address(dss.vat), who, 1);
if (address(dss.dai) != address(0)) GodMode.setWard(address(dss.dai), who, 1);
if (address(dss.vow) != address(0)) GodMode.setWard(address(dss.vow), who, 1);
if (address(dss.dog) != address(0)) GodMode.setWard(address(dss.dog), who, 1);
if (address(dss.pot) != address(0)) GodMode.setWard(address(dss.pot), who, 1);
if (address(dss.jug) != address(0)) GodMode.setWard(address(dss.jug), who, 1);
if (address(dss.spotter) != address(0)) GodMode.setWard(address(dss.spotter), who, 1);
if (address(dss.end) != address(0)) GodMode.setWard(address(dss.end), who, 1);
if (address(dss.cure) != address(0)) GodMode.setWard(address(dss.cure), who, 1);
if (address(dss.esm) != address(0)) GodMode.setWard(address(dss.esm), who, 1);
}
/// @dev Give who a ward on all core contracts to this address
function giveAdminAccess(DssInstance memory dss) internal {
giveAdminAccess(dss, address(this));
}
function newUser(DssInstance memory dss) internal returns (MCDUser) {
return new MCDUser(dss);
}
}
// lib/dss-test/src/MCDUser.sol
// SPDX-FileCopyrightText: © 2022 Dai Foundation <www.daifoundation.org>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
/// @dev A user which can perform actions in MCD
contract MCDUser {
using GodMode for *;
DssInstance dss;
constructor(
DssInstance memory _dss
) {
dss = _dss;
}
/// @dev Create an auction on the provided ilk
/// @param join The gem join adapter to use
/// @param amount The amount of gems to use as collateral
function createAuction(
GemJoinAbstract join,
uint256 amount
) public {
DSTokenAbstract token = DSTokenAbstract(join.gem());
bytes32 ilk = join.ilk();
uint256 prevBalance = token.balanceOf(address(this));
token.setBalance(address(this), amount);
uint256 prevAllowance = token.allowance(address(this), address(join));
token.approve(address(join), amount);
join.join(address(this), amount);
token.setBalance(address(this), prevBalance);
token.approve(address(join), prevAllowance);
(,uint256 rate, uint256 spot,,) = dss.vat.ilks(ilk);
uint256 art = spot * amount / rate;
uint256 ink = amount * (10 ** (18 - token.decimals()));
dss.vat.frob(ilk, address(this), address(this), address(this), int256(ink), int256(art));
// Temporarily increase the liquidation threshold to liquidate this one vault then reset it
uint256 prevWard = dss.vat.wards(address(this));
dss.vat.setWard(address(this), 1);
dss.vat.file(ilk, "spot", spot / 2);
dss.dog.bark(ilk, address(this), address(this));
dss.vat.file(ilk, "spot", spot);
dss.vat.setWard(address(this), prevWard);
}
}
// src/dependencies/dss-allocator/AllocatorInit.sol
// SPDX-FileCopyrightText: © 2023 Dai Foundation <www.daifoundation.org>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
interface IlkRegistryLike {
function put(
bytes32 _ilk,
address _join,
address _gem,
uint256 _dec,
uint256 _class,
address _pip,
address _xlip,
string calldata _name,
string calldata _symbol
) external;
}
interface RolesLike {
function setIlkAdmin(bytes32, address) external;
}
interface RegistryLike_1 {
function file(bytes32, bytes32, address) external;
}
interface VaultLike {
function ilk() external view returns (bytes32);
function roles() external view returns (address);
function buffer() external view returns (address);
function vat() external view returns (address);
function usds() external view returns (address);
function file(bytes32, address) external;
}
interface BufferLike {
function approve(address, address, uint256) external;
}
interface AutoLineLike {
function setIlk(bytes32, uint256, uint256, uint256) external;
}
struct AllocatorIlkConfig {
bytes32 ilk;
uint256 duty;
uint256 gap;
uint256 maxLine;
uint256 ttl;
address allocatorProxy;
address ilkRegistry;
}
function bytes32ToStr(bytes32 _bytes32) pure returns (string memory) {
uint256 len;
while(len < 32 && _bytes32[len] != 0) len++;
bytes memory bytesArray = new bytes(len);
for (uint256 i; i < len; i++) {
bytesArray[i] = _bytes32[i];
}
return string(bytesArray);
}
library AllocatorInit {
uint256 constant WAD = 10 ** 18;
uint256 constant RAY = 10 ** 27;
uint256 constant RATES_ONE_HUNDRED_PCT = 1000000021979553151239153027;
function initShared(
DssInstance memory dss,
AllocatorSharedInstance memory sharedInstance
) internal {
dss.chainlog.setAddress("ALLOCATOR_ROLES", sharedInstance.roles);
dss.chainlog.setAddress("ALLOCATOR_REGISTRY", sharedInstance.registry);
}
// Please note this should be executed by the pause proxy
function initIlk(
DssInstance memory dss,
AllocatorSharedInstance memory sharedInstance,
AllocatorIlkInstance memory ilkInstance,
AllocatorIlkConfig memory cfg
) internal {
bytes32 ilk = cfg.ilk;
// Sanity checks
require(VaultLike(ilkInstance.vault).ilk() == ilk, "AllocatorInit/vault-ilk-mismatch");
require(VaultLike(ilkInstance.vault).roles() == sharedInstance.roles, "AllocatorInit/vault-roles-mismatch");
require(VaultLike(ilkInstance.vault).buffer() == ilkInstance.buffer, "AllocatorInit/vault-buffer-mismatch");
require(VaultLike(ilkInstance.vault).vat() == address(dss.vat), "AllocatorInit/vault-vat-mismatch");
// Once usdsJoin is in the chainlog and adapted to dss-test should also check against it
// Onboard the ilk
dss.vat.init(ilk);
dss.jug.init(ilk);
require((cfg.duty >= RAY) && (cfg.duty <= RATES_ONE_HUNDRED_PCT), "AllocatorInit/ilk-duty-out-of-bounds");
dss.jug.file(ilk, "duty", cfg.duty);
dss.vat.file(ilk, "line", cfg.gap);
dss.vat.file("Line", dss.vat.Line() + cfg.gap);
AutoLineLike(dss.chainlog.getAddress("MCD_IAM_AUTO_LINE")).setIlk(ilk, cfg.maxLine, cfg.gap, cfg.ttl);
dss.spotter.file(ilk, "pip", sharedInstance.oracle);
dss.spotter.file(ilk, "mat", RAY);
dss.spotter.poke(ilk);
// Add buffer to registry
RegistryLike_1(sharedInstance.registry).file(ilk, "buffer", ilkInstance.buffer);
// Initiate the allocator vault
dss.vat.slip(ilk, ilkInstance.vault, int256(10**12 * WAD));
dss.vat.grab(ilk, ilkInstance.vault, ilkInstance.vault, address(0), int256(10**12 * WAD), 0);
VaultLike(ilkInstance.vault).file("jug", address(dss.jug));
// Allow vault to pull funds from the buffer
BufferLike(ilkInstance.buffer).approve(VaultLike(ilkInstance.vault).usds(), ilkInstance.vault, type(uint256).max);
// Set the allocator proxy as the ilk admin instead of the Pause Proxy
RolesLike(sharedInstance.roles).setIlkAdmin(ilk, cfg.allocatorProxy);
// Move ownership of the ilk contracts to the allocator proxy
ScriptTools.switchOwner(ilkInstance.vault, ilkInstance.owner, cfg.allocatorProxy);
ScriptTools.switchOwner(ilkInstance.buffer, ilkInstance.owner, cfg.allocatorProxy);
// Add allocator-specific contracts to changelog
string memory ilkString = ScriptTools.ilkToChainlogFormat(ilk);
dss.chainlog.setAddress(ScriptTools.stringToBytes32(string(abi.encodePacked(ilkString, "_VAULT"))), ilkInstance.vault);
dss.chainlog.setAddress(ScriptTools.stringToBytes32(string(abi.encodePacked(ilkString, "_BUFFER"))), ilkInstance.buffer);
dss.chainlog.setAddress(ScriptTools.stringToBytes32(string(abi.encodePacked("PIP_", ilkString))), sharedInstance.oracle);
// Add to ilk registry
IlkRegistryLike(cfg.ilkRegistry).put({
_ilk : ilk,
_join : address(0),
_gem : address(0),
_dec : 0,
_class : 5, // RWAs are class 3, D3Ms and Teleport are class 4
_pip : sharedInstance.oracle,
_xlip : address(0),
_name : bytes32ToStr(ilk),
_symbol : bytes32ToStr(ilk)
});
}
}
// src/DssSpell.sol
// SPDX-FileCopyrightText: © 2020 Dai Foundation <www.daifoundation.org>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
interface ChainlogLike_1 {
function removeAddress(bytes32) external;
}
interface LineMomLike {
function addIlk(bytes32 ilk) external;
}
interface StakingRewardsLike {
function setRewardsDuration(uint256) external;
}
interface ProxyLike {
function exec(address target, bytes calldata args) external payable returns (bytes memory out);
}
contract DssSpellAction is DssAction {
// Provides a descriptive tag for bot consumption
// This should be modified weekly to provide a summary of the actions
// Hash: cast keccak -- "$(wget 'https://raw.githubusercontent.com/makerdao/community/d5a63907ac05e2fa109bf1e44f2e00a6769635e1/governance/votes/Executive%20vote%20-%20April%203%2C%202025.md' -q -O - 2>/dev/null)"
string public constant override description = "2025-04-03 MakerDAO Executive Spell | Hash: 0x472d46618b06928e248b7ff6d99a1ab343828ed8a3e7bcd8db4433c99aae777f";
// Set office hours according to the summary
function officeHours() public pure override returns (bool) {
return true;
}
// Note: by the previous convention it should be a comma-separated list of DAO resolutions IPFS hashes
string public constant dao_resolutions = "bafkreidmumjkch6hstk7qslyt3dlfakgb5oi7b3aab7mqj66vkds6ng2de";
// ---------- Rates ----------
// Many of the settings that change weekly rely on the rate accumulator
// described at https://docs.makerdao.com/smart-contract-modules/rates-module
// To check this yourself, use the following rate calculation (example 8%):
//
// $ bc -l <<< 'scale=27; e( l(1.08)/(60 * 60 * 24 * 365) )'
//
// A table of rates can be found at
// https://ipfs.io/ipfs/QmVp4mhhbwWGTfbh2BzwQB9eiBrQBKiqcPRZCaAxNUaar6
//
// uint256 internal constant X_PCT_RATE = ;
uint256 internal constant ZERO_PCT_RATE = 1000000000000000000000000000;
// ---------- Math ----------
uint256 internal constant RAD = 10 ** 45;
// ---------- Contracts ----------
address internal immutable MCD_PAUSE_PROXY = DssExecLib.pauseProxy();
address internal immutable ILK_REGISTRY = DssExecLib.reg();
address internal immutable PIP_ALLOCATOR = DssExecLib.getChangelogAddress("PIP_ALLOCATOR");
address internal immutable ALLOCATOR_ROLES = DssExecLib.getChangelogAddress("ALLOCATOR_ROLES");
address internal immutable ALLOCATOR_REGISTRY = DssExecLib.getChangelogAddress("ALLOCATOR_REGISTRY");
address internal immutable LINE_MOM = DssExecLib.getChangelogAddress("LINE_MOM");
address internal immutable MCD_SPLIT = DssExecLib.getChangelogAddress("MCD_SPLIT");
address internal immutable REWARDS_LSMKR_USDS = DssExecLib.getChangelogAddress("REWARDS_LSMKR_USDS");
address internal constant ALLOCATOR_BLOOM_A_VAULT = 0x26512A41C8406800f21094a7a7A0f980f6e25d43;
address internal constant ALLOCATOR_BLOOM_A_BUFFER = 0x629aD4D779F46B8A1491D3f76f7E97Cb04D8b1Cd;
address internal constant ALLOCATOR_BLOOM_A_SUBPROXY = 0x1369f7b2b38c76B6478c0f0E66D94923421891Ba;
// ---------- Spark Proxy Spell ----------
// Spark Proxy: https://github.com/marsfoundation/sparklend-deployments/blob/bba4c57d54deb6a14490b897c12a949aa035a99b/script/output/1/primary-sce-latest.json#L2
address internal constant SPARK_PROXY = 0x3300f198988e4C9C63F75dF86De36421f06af8c4;
address internal constant SPARK_SPELL = 0x6B34C0E12C84338f494efFbf49534745DDE2F24b;
function actions() public override {
// ---------- Init Star 2 Allocator Instance Step 1 ----------
// Forum: https://forum.sky.money/t/technical-scope-of-the-star-2-allocator-launch/26190
// Forum: https://forum.sky.money/t/technical-scope-of-the-star-2-allocator-launch/26190/3
// Init new Allocator instance by calling AllocatorInit.initIlk with:
// Note: Set sharedInstance with the following parameters:
AllocatorSharedInstance memory allocatorSharedInstance = AllocatorSharedInstance({
// sharedInstance.oracle: PIP_ALLOCATOR from chainlog
oracle: PIP_ALLOCATOR,
// sharedInstance.roles: ALLOCATOR_ROLES from chainlog
roles: ALLOCATOR_ROLES,
// sharedInstance.registry: ALLOCATOR_REGISTRY from chainlog
registry: ALLOCATOR_REGISTRY
});
// Note: Set ilkInstance with the following parameters:
AllocatorIlkInstance memory allocatorIlkInstance = AllocatorIlkInstance({
// ilkInstance.owner: MCD_PAUSE_PROXY from chainlog
owner: MCD_PAUSE_PROXY,
// ilkInstance.vault: 0x26512A41C8406800f21094a7a7A0f980f6e25d43
vault: ALLOCATOR_BLOOM_A_VAULT,
// ilkInstance.buffer: 0x629aD4D779F46B8A1491D3f76f7E97Cb04D8b1Cd
buffer: ALLOCATOR_BLOOM_A_BUFFER
});
// Note: Set cfg with the following parameters:
AllocatorIlkConfig memory allocatorIlkCfg = AllocatorIlkConfig({
// cfg.ilk: ALLOCATOR-BLOOM-A
ilk: "ALLOCATOR-BLOOM-A",
// cfg.duty: 0%
duty: ZERO_PCT_RATE,
// cfg.gap: 10 million USDS
gap: 10_000_000 * RAD,
// cfg.maxLine: 10 million USDS
maxLine: 10_000_000 * RAD,
// cfg.ttl: 86400 seconds
ttl: 86_400,
// cfg.allocatorProxy: 0x1369f7b2b38c76B6478c0f0E66D94923421891Ba
allocatorProxy: ALLOCATOR_BLOOM_A_SUBPROXY,
// cfg.ilkRegistry: ILK_REGISTRY from chainlog
ilkRegistry: ILK_REGISTRY
});
// Note: We also need dss as an input parameter for initIlk
DssInstance memory dss = MCD.loadFromChainlog(DssExecLib.LOG);
// Note: Now we can execute the initial instruction with all the relevant parameters by calling AllocatorInit.initIlk
AllocatorInit.initIlk(dss, allocatorSharedInstance, allocatorIlkInstance, allocatorIlkCfg);
// Remove newly created PIP_ALLOCATOR_BLOOM_A from the chainlog
// Note: PIP_ALLOCATOR_BLOOM_A was added to the chainlog when calling AllocatorInit.initIlk above
ChainlogLike_1(DssExecLib.LOG).removeAddress("PIP_ALLOCATOR_BLOOM_A");
// Add ALLOCATOR-BLOOM-A to the LineMOM
LineMomLike(LINE_MOM).addIlk("ALLOCATOR-BLOOM-A");
// ---------- Smart Burn Engine Parameter Update ----------
// Forum: https://forum.sky.money/t/smart-burn-engine-parameter-update-april-3-spell/26201
// Poll: https://vote.makerdao.com/polling/Qmf3cZuM
// Reduce Splitter.hop by 493 seconds from 1,728 seconds to 1,235 seconds
DssExecLib.setValue(MCD_SPLIT, "hop", 1_235);
// Note: Update farm rewards duration
StakingRewardsLike(REWARDS_LSMKR_USDS).setRewardsDuration(1_235);
// ---------- DAO Resolution ----------
// Forum: https://forum.sky.money/t/spark-tokenization-grand-prix-legal-overview-of-selected-products/26154
// Forum: https://forum.sky.money/t/spark-tokenization-grand-prix-legal-overview-of-selected-products/26154/2
// Approve DAO Resolution with hash bafkreidmumjkch6hstk7qslyt3dlfakgb5oi7b3aab7mqj66vkds6ng2de
// Note: see `dao_resolutions` public variable declared above
// Note: bump Chainlog version as multiple keys are being added
DssExecLib.setChangelogVersion("1.19.8");
// ---------- Spark Proxy Spell ----------
// Forum: https://forum.sky.money/t/april-3-2025-proposed-changes-to-spark-for-upcoming-spell-2/26203
// Forum: https://forum.sky.money/t/april-3-2025-proposed-changes-to-spark-for-upcoming-spell/26155
// Poll: https://vote.makerdao.com/polling/QmehvjH9
// Poll: https://vote.makerdao.com/polling/QmNZVfSq
// Poll: https://vote.makerdao.com/polling/QmSwQ6Wc
// Poll: https://vote.makerdao.com/polling/QmSytTo4
// Poll: https://vote.makerdao.com/polling/QmT87a3p
// Poll: https://vote.makerdao.com/polling/QmTE29em
// Poll: https://vote.makerdao.com/polling/QmWQCbns
// Poll: https://vote.makerdao.com/polling/QmXAJTvs
// Poll: https://vote.makerdao.com/polling/QmY6tE6h
// Poll: https://vote.makerdao.com/polling/QmZGQhkG
// Execute Spark Proxy spell at 0x6B34C0E12C84338f494efFbf49534745DDE2F24b
ProxyLike(SPARK_PROXY).exec(SPARK_SPELL, abi.encodeWithSignature("execute()"));
}
}
contract DssSpell is DssExec {
constructor() DssExec(block.timestamp + 30 days, address(new DssSpellAction())) {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"action","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cast","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"done","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eta","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"expiration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"log","outputs":[{"internalType":"contract Changelog","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextCastTime","outputs":[{"internalType":"uint256","name":"castTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"officeHours","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[{"internalType":"contract PauseAbstract","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"schedule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tag","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"}]Contract Creation Code
6101006040523480156200001257600080fd5b5062278d004262000024919062000247565b604051620000329062000200565b604051809103906000f0801580156200004f573d6000803e3d6000fd5b5073da0ab1e0017debcd72be8599041a2aa3ba7e740f73ffffffffffffffffffffffffffffffffffffffff166321f8a7216040518163ffffffff1660e01b81526004016200009d90620002a8565b602060405180830381865afa158015620000bb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000e191906200032d565b73ffffffffffffffffffffffffffffffffffffffff1660e08173ffffffffffffffffffffffffffffffffffffffff16815250508160c081815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250506040516024016040516020818303038152906040527f61461954000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060019081620001e39190620005cf565b50600080829050803f9150816080818152505050505050620006b6565b61404d806200194683390190565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600062000254826200020e565b915062000261836200020e565b92508282019050808211156200027c576200027b62000218565b5b92915050565b7f4d43445f50415553450000000000000000000000000000000000000000000000815250565b6000602082019050620002be6000830162000282565b919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002f582620002c8565b9050919050565b6200030781620002e8565b81146200031357600080fd5b50565b6000815190506200032781620002fc565b92915050565b600060208284031215620003465762000345620002c3565b5b6000620003568482850162000316565b91505092915050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620003e157607f821691505b602082108103620003f757620003f662000399565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620004617fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000422565b6200046d868362000422565b95508019841693508086168417925050509392505050565b6000819050919050565b6000620004b0620004aa620004a4846200020e565b62000485565b6200020e565b9050919050565b6000819050919050565b620004cc836200048f565b620004e4620004db82620004b7565b8484546200042f565b825550505050565b600090565b620004fb620004ec565b62000508818484620004c1565b505050565b5b81811015620005305762000524600082620004f1565b6001810190506200050e565b5050565b601f8211156200057f576200054981620003fd565b620005548462000412565b8101602085101562000564578190505b6200057c620005738562000412565b8301826200050d565b50505b505050565b600082821c905092915050565b6000620005a46000198460080262000584565b1980831691505092915050565b6000620005bf838362000591565b9150826002028217905092915050565b620005da826200035f565b67ffffffffffffffff811115620005f657620005f56200036a565b5b620006028254620003c8565b6200060f82828562000534565b600060209050601f83116001811462000647576000841562000632578287015190505b6200063e8582620005b1565b865550620006ae565b601f1984166200065786620003fd565b60005b8281101562000681578489015182556001820191506020850194506020810190506200065a565b86831015620006a157848901516200069d601f89168262000591565b8355505b6001600288020188555050505b505050505050565b60805160a05160c05160e0516112096200073d6000396000818161047601528181610505015281816106ac015261074c0152600081816102e501526106050152600081816102c101528181610347015281816103dd0152818161054101528181610788015261082a0152600081816103210152818161056201526107a901526112096000f3fe608060405234801561001057600080fd5b50600436106100ce5760003560e01c80637284e4161161008c578063ae8421e111610066578063ae8421e1146101cd578063b0604a26146101eb578063f7992d85146101f5578063fe7d47bb14610213576100ce565b80637284e416146101875780638456cb59146101a557806396d373e5146101c3576100ce565b8062a7029b146100d35780630a7a1c4d146100f15780634665096d1461010f57806351973ec91461012d57806351f910661461014b5780636e832f0714610169575b600080fd5b6100db610231565b6040516100e89190610959565b60405180910390f35b6100f96102bf565b60405161010691906109bc565b60405180910390f35b6101176102e3565b60405161012491906109f0565b60405180910390f35b610135610307565b6040516101429190610a6a565b60405180910390f35b61015361031f565b6040516101609190610a9e565b60405180910390f35b610171610343565b60405161017e9190610ad4565b60405180910390f35b61018f6103d9565b60405161019c9190610b44565b60405180910390f35b6101ad610474565b6040516101ba9190610b87565b60405180910390f35b6101cb610498565b005b6101d56105f0565b6040516101e29190610ad4565b60405180910390f35b6101f3610603565b005b6101fd610820565b60405161020a91906109f0565b60405180910390f35b61021b610826565b60405161022891906109f0565b60405180910390f35b6001805461023e90610bd1565b80601f016020809104026020016040519081016040528092919081815260200182805461026a90610bd1565b80156102b75780601f1061028c576101008083540402835291602001916102b7565b820191906000526020600020905b81548152906001019060200180831161029a57829003601f168201915b505050505081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b73da0ab1e0017debcd72be8599041a2aa3ba7e740f81565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e832f076040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103d49190610c42565b905090565b60607f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637284e4166040518163ffffffff1660e01b8152600401600060405180830381865afa158015610446573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061046f9190610d95565b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b600260009054906101000a900460ff16156104e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104df90610e2a565b60405180910390fd5b6001600260006101000a81548160ff0219169083151502179055507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663168ccd677f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060016000546040518563ffffffff1660e01b81526004016105a59493929190610ee3565b6000604051808303816000875af11580156105c4573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906105ed9190610fd0565b50565b600260009054906101000a900460ff1681565b7f0000000000000000000000000000000000000000000000000000000000000000421115610666576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161065d90611065565b60405180910390fd5b60008054146106aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106a1906110f7565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636a42b8f86040518163ffffffff1660e01b8152600401602060405180830381865afa158015610715573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107399190611143565b42610744919061119f565b6000819055507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166346d2fbbb7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060016000546040518563ffffffff1660e01b81526004016107ec9493929190610ee3565b600060405180830381600087803b15801561080657600080fd5b505af115801561081a573d6000803e3d6000fd5b50505050565b60005481565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663bf0fbcec6000546040518263ffffffff1660e01b815260040161088391906109f0565b602060405180830381865afa1580156108a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c49190611143565b905090565b600081519050919050565b600082825260208201905092915050565b60005b838110156109035780820151818401526020810190506108e8565b60008484015250505050565b6000601f19601f8301169050919050565b600061092b826108c9565b61093581856108d4565b93506109458185602086016108e5565b61094e8161090f565b840191505092915050565b600060208201905081810360008301526109738184610920565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006109a68261097b565b9050919050565b6109b68161099b565b82525050565b60006020820190506109d160008301846109ad565b92915050565b6000819050919050565b6109ea816109d7565b82525050565b6000602082019050610a0560008301846109e1565b92915050565b6000819050919050565b6000610a30610a2b610a268461097b565b610a0b565b61097b565b9050919050565b6000610a4282610a15565b9050919050565b6000610a5482610a37565b9050919050565b610a6481610a49565b82525050565b6000602082019050610a7f6000830184610a5b565b92915050565b6000819050919050565b610a9881610a85565b82525050565b6000602082019050610ab36000830184610a8f565b92915050565b60008115159050919050565b610ace81610ab9565b82525050565b6000602082019050610ae96000830184610ac5565b92915050565b600081519050919050565b600082825260208201905092915050565b6000610b1682610aef565b610b208185610afa565b9350610b308185602086016108e5565b610b398161090f565b840191505092915050565b60006020820190508181036000830152610b5e8184610b0b565b905092915050565b6000610b7182610a37565b9050919050565b610b8181610b66565b82525050565b6000602082019050610b9c6000830184610b78565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680610be957607f821691505b602082108103610bfc57610bfb610ba2565b5b50919050565b6000604051905090565b600080fd5b600080fd5b610c1f81610ab9565b8114610c2a57600080fd5b50565b600081519050610c3c81610c16565b92915050565b600060208284031215610c5857610c57610c0c565b5b6000610c6684828501610c2d565b91505092915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610cb18261090f565b810181811067ffffffffffffffff82111715610cd057610ccf610c79565b5b80604052505050565b6000610ce3610c02565b9050610cef8282610ca8565b919050565b600067ffffffffffffffff821115610d0f57610d0e610c79565b5b610d188261090f565b9050602081019050919050565b6000610d38610d3384610cf4565b610cd9565b905082815260208101848484011115610d5457610d53610c74565b5b610d5f8482856108e5565b509392505050565b600082601f830112610d7c57610d7b610c6f565b5b8151610d8c848260208601610d25565b91505092915050565b600060208284031215610dab57610daa610c0c565b5b600082015167ffffffffffffffff811115610dc957610dc8610c11565b5b610dd584828501610d67565b91505092915050565b7f7370656c6c2d616c72656164792d636173740000000000000000000000000000600082015250565b6000610e14601283610afa565b9150610e1f82610dde565b602082019050919050565b60006020820190508181036000830152610e4381610e07565b9050919050565b60008190508160005260206000209050919050565b60008154610e6c81610bd1565b610e7681866108d4565b94506001821660008114610e915760018114610ea757610eda565b60ff198316865281151560200286019350610eda565b610eb085610e4a565b60005b83811015610ed257815481890152600182019150602081019050610eb3565b808801955050505b50505092915050565b6000608082019050610ef860008301876109ad565b610f056020830186610a8f565b8181036040830152610f178185610e5f565b9050610f2660608301846109e1565b95945050505050565b600067ffffffffffffffff821115610f4a57610f49610c79565b5b610f538261090f565b9050602081019050919050565b6000610f73610f6e84610f2f565b610cd9565b905082815260208101848484011115610f8f57610f8e610c74565b5b610f9a8482856108e5565b509392505050565b600082601f830112610fb757610fb6610c6f565b5b8151610fc7848260208601610f60565b91505092915050565b600060208284031215610fe657610fe5610c0c565b5b600082015167ffffffffffffffff81111561100457611003610c11565b5b61101084828501610fa2565b91505092915050565b7f5468697320636f6e747261637420686173206578706972656400000000000000600082015250565b600061104f601983610afa565b915061105a82611019565b602082019050919050565b6000602082019050818103600083015261107e81611042565b9050919050565b7f54686973207370656c6c2068617320616c7265616479206265656e207363686560008201527f64756c6564000000000000000000000000000000000000000000000000000000602082015250565b60006110e1602583610afa565b91506110ec82611085565b604082019050919050565b60006020820190508181036000830152611110816110d4565b9050919050565b611120816109d7565b811461112b57600080fd5b50565b60008151905061113d81611117565b92915050565b60006020828403121561115957611158610c0c565b5b60006111678482850161112e565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006111aa826109d7565b91506111b5836109d7565b92508282019050808211156111cd576111cc611170565b5b9291505056fea26469706673582212203b20d69f34f080094b7613d3420ca1a0675246ce4e1ac15199d1aeff86bec9bd64736f6c63430008100033610180604052738de6ddbcd5053d32292aaa0d2105a32d108484a66363a8fd896040518163ffffffff1660e01b8152600401602060405180830381865af41580156200004f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000759190620005d9565b73ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff16815250738de6ddbcd5053d32292aaa0d2105a32d108484a663738fdd1a6040518163ffffffff1660e01b8152600401602060405180830381865af4158015620000f1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001179190620005d9565b73ffffffffffffffffffffffffffffffffffffffff1660a09073ffffffffffffffffffffffffffffffffffffffff16815250738de6ddbcd5053d32292aaa0d2105a32d108484a663a16ed56f6040518163ffffffff1660e01b8152600401620001809062000631565b602060405180830381865af41580156200019e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001c49190620005d9565b73ffffffffffffffffffffffffffffffffffffffff1660c09073ffffffffffffffffffffffffffffffffffffffff16815250738de6ddbcd5053d32292aaa0d2105a32d108484a663a16ed56f6040518163ffffffff1660e01b81526004016200022d9062000672565b602060405180830381865af41580156200024b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002719190620005d9565b73ffffffffffffffffffffffffffffffffffffffff1660e09073ffffffffffffffffffffffffffffffffffffffff16815250738de6ddbcd5053d32292aaa0d2105a32d108484a663a16ed56f6040518163ffffffff1660e01b8152600401620002da90620006b3565b602060405180830381865af4158015620002f8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200031e9190620005d9565b73ffffffffffffffffffffffffffffffffffffffff166101009073ffffffffffffffffffffffffffffffffffffffff16815250738de6ddbcd5053d32292aaa0d2105a32d108484a663a16ed56f6040518163ffffffff1660e01b81526004016200038890620006f4565b602060405180830381865af4158015620003a6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003cc9190620005d9565b73ffffffffffffffffffffffffffffffffffffffff166101209073ffffffffffffffffffffffffffffffffffffffff16815250738de6ddbcd5053d32292aaa0d2105a32d108484a663a16ed56f6040518163ffffffff1660e01b8152600401620004369062000735565b602060405180830381865af415801562000454573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200047a9190620005d9565b73ffffffffffffffffffffffffffffffffffffffff166101409073ffffffffffffffffffffffffffffffffffffffff16815250738de6ddbcd5053d32292aaa0d2105a32d108484a663a16ed56f6040518163ffffffff1660e01b8152600401620004e49062000776565b602060405180830381865af415801562000502573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620005289190620005d9565b73ffffffffffffffffffffffffffffffffffffffff166101609073ffffffffffffffffffffffffffffffffffffffff168152503480156200056857600080fd5b5062000791565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620005a18262000574565b9050919050565b620005b38162000594565b8114620005bf57600080fd5b50565b600081519050620005d381620005a8565b92915050565b600060208284031215620005f257620005f16200056f565b5b60006200060284828501620005c2565b91505092915050565b7f5049505f414c4c4f4341544f5200000000000000000000000000000000000000815250565b600060208201905062000647600083016200060b565b919050565b7f414c4c4f4341544f525f524f4c45530000000000000000000000000000000000815250565b600060208201905062000688600083016200064c565b919050565b7f414c4c4f4341544f525f52454749535452590000000000000000000000000000815250565b6000602082019050620006c9600083016200068d565b919050565b7f4c494e455f4d4f4d000000000000000000000000000000000000000000000000815250565b60006020820190506200070a60008301620006ce565b919050565b7f4d43445f53504c49540000000000000000000000000000000000000000000000815250565b60006020820190506200074b600083016200070f565b919050565b7f524557415244535f4c534d4b525f555344530000000000000000000000000000815250565b60006020820190506200078c6000830162000750565b919050565b60805160a05160c05160e05161010051610120516101405161016051613856620007f760003960006106e201526000610671015260006105ce01526000610337015260006102fb015260006102bf015260006104e80152600061038001526138566000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c806361461954146100675780636e832f07146100715780637284e4161461008f578063b22555bb146100ad578063bf0fbcec146100cb578063f99e36bc146100fb575b600080fd5b61006f610105565b005b6100796101cf565b604051610086919061247d565b60405180910390f35b6100976101d8565b6040516100a49190612528565b60405180910390f35b6100b56101f4565b6040516100c29190612528565b60405180910390f35b6100e560048036038101906100e09190612594565b610210565b6040516100f291906125d0565b60405180910390f35b6101036102b0565b005b738de6ddbcd5053d32292aaa0d2105a32d108484a66335329d4c426101286101cf565b6040518363ffffffff1660e01b815260040161014592919061261a565b602060405180830381865af4158015610162573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610186919061266f565b6101c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101bc906126e8565b60405180910390fd5b6101cd6102b0565b565b60006001905090565b6040518060a00160405280606e8152602001613778606e913981565b6040518060600160405280603b81526020016137e6603b913981565b600064ffffffffff801682111561022657600080fd5b738de6ddbcd5053d32292aaa0d2105a32d108484a663d2557456834261024a6101cf565b6040518463ffffffff1660e01b815260040161026893929190612708565b602060405180830381865af4158015610285573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a99190612754565b9050919050565b600060405180606001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168152509050600060405180606001604052807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1681526020017326512a41c8406800f21094a7a7a0f980f6e25d4373ffffffffffffffffffffffffffffffffffffffff16815260200173629ad4d779f46b8a1491d3f76f7e97cb04d8b1cd73ffffffffffffffffffffffffffffffffffffffff16815250905060006040518060e001604052807f414c4c4f4341544f522d424c4f4f4d2d4100000000000000000000000000000081526020016b033b2e3c9fd0803ce80000008152602001722cd76fe086b93ce2f768a00b22a000000000006298968061048191906127b0565b8152602001722cd76fe086b93ce2f768a00b22a00000000000629896806104a891906127b0565b8152602001620151808152602001731369f7b2b38c76b6478c0f0e66d94923421891ba73ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168152509050600061054173da0ab1e0017debcd72be8599041a2aa3ba7e740f610906565b905061054f8185858561091e565b73da0ab1e0017debcd72be8599041a2aa3ba7e740f73ffffffffffffffffffffffffffffffffffffffff16639faf6fb66040518163ffffffff1660e01b815260040161059a90612830565b600060405180830381600087803b1580156105b457600080fd5b505af11580156105c8573d6000803e3d6000fd5b505050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663f2dd39926040518163ffffffff1660e01b81526004016106239061286f565b600060405180830381600087803b15801561063d57600080fd5b505af1158015610651573d6000803e3d6000fd5b50505050738de6ddbcd5053d32292aaa0d2105a32d108484a663eb3ffe9e7f00000000000000000000000000000000000000000000000000000000000000006104d36040518363ffffffff1660e01b81526004016106b0929190612934565b60006040518083038186803b1580156106c857600080fd5b505af41580156106dc573d6000803e3d6000fd5b505050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663cc1a378f6104d36040518263ffffffff1660e01b815260040161073b9190612978565b600060405180830381600087803b15801561075557600080fd5b505af1158015610769573d6000803e3d6000fd5b50505050738de6ddbcd5053d32292aaa0d2105a32d108484a6635f3a7dd76040518163ffffffff1660e01b81526004016107a2906129f0565b60006040518083038186803b1580156107ba57600080fd5b505af41580156107ce573d6000803e3d6000fd5b50505050733300f198988e4c9c63f75df86de36421f06af8c473ffffffffffffffffffffffffffffffffffffffff1663be6002c2736b34c0e12c84338f494effbf49534745dde2f24b6040516024016040516020818303038152906040527f61461954000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518363ffffffff1660e01b81526004016108b7929190612a74565b6000604051808303816000875af11580156108d6573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906108ff9190612bca565b5050505050565b61090e6122bf565b61091782611848565b9050919050565b60008160000151905080836020015173ffffffffffffffffffffffffffffffffffffffff1663c5ce281e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610977573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099b9190612c49565b146109db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d290612cc2565b60405180910390fd5b836020015173ffffffffffffffffffffffffffffffffffffffff16836020015173ffffffffffffffffffffffffffffffffffffffff1663392f5f646040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a699190612d0e565b73ffffffffffffffffffffffffffffffffffffffff1614610abf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ab690612dad565b60405180910390fd5b826040015173ffffffffffffffffffffffffffffffffffffffff16836020015173ffffffffffffffffffffffffffffffffffffffff1663edaafe206040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4d9190612d0e565b73ffffffffffffffffffffffffffffffffffffffff1614610ba3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9a90612e3f565b60405180910390fd5b846020015173ffffffffffffffffffffffffffffffffffffffff16836020015173ffffffffffffffffffffffffffffffffffffffff166336569e776040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c319190612d0e565b73ffffffffffffffffffffffffffffffffffffffff1614610c87576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c7e90612eab565b60405180910390fd5b846020015173ffffffffffffffffffffffffffffffffffffffff16633b663195826040518263ffffffff1660e01b8152600401610cc49190612eda565b600060405180830381600087803b158015610cde57600080fd5b505af1158015610cf2573d6000803e3d6000fd5b505050508460e0015173ffffffffffffffffffffffffffffffffffffffff16633b663195826040518263ffffffff1660e01b8152600401610d339190612eda565b600060405180830381600087803b158015610d4d57600080fd5b505af1158015610d61573d6000803e3d6000fd5b505050506b033b2e3c9fd0803ce8000000826020015110158015610d9557506b033b2e3dd0d78f60556d6583826020015111155b610dd4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dcb90612f67565b60405180910390fd5b8460e0015173ffffffffffffffffffffffffffffffffffffffff16631a0b287e8284602001516040518363ffffffff1660e01b8152600401610e17929190612fad565b600060405180830381600087803b158015610e3157600080fd5b505af1158015610e45573d6000803e3d6000fd5b50505050846020015173ffffffffffffffffffffffffffffffffffffffff16631a0b287e8284604001516040518363ffffffff1660e01b8152600401610e8c929190613008565b600060405180830381600087803b158015610ea657600080fd5b505af1158015610eba573d6000803e3d6000fd5b50505050846020015173ffffffffffffffffffffffffffffffffffffffff166329ae81148360400151876020015173ffffffffffffffffffffffffffffffffffffffff1663babe8a3f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f569190612754565b610f60919061303d565b6040518263ffffffff1660e01b8152600401610f7c9190613097565b600060405180830381600087803b158015610f9657600080fd5b505af1158015610faa573d6000803e3d6000fd5b50505050846000015173ffffffffffffffffffffffffffffffffffffffff166321f8a7216040518163ffffffff1660e01b8152600401610fe9906130e4565b602060405180830381865afa158015611006573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102a9190612d0e565b73ffffffffffffffffffffffffffffffffffffffff16632a48322d828460600151856040015186608001516040518563ffffffff1660e01b815260040161107494939291906130fd565b600060405180830381600087803b15801561108e57600080fd5b505af11580156110a2573d6000803e3d6000fd5b5050505084610100015173ffffffffffffffffffffffffffffffffffffffff1663ebecb39d8286600001516040518363ffffffff1660e01b81526004016110ea929190613168565b600060405180830381600087803b15801561110457600080fd5b505af1158015611118573d6000803e3d6000fd5b5050505084610100015173ffffffffffffffffffffffffffffffffffffffff16631a0b287e826b033b2e3c9fd0803ce80000006040518363ffffffff1660e01b81526004016111689291906131c3565b600060405180830381600087803b15801561118257600080fd5b505af1158015611196573d6000803e3d6000fd5b5050505084610100015173ffffffffffffffffffffffffffffffffffffffff16631504460f826040518263ffffffff1660e01b81526004016111d89190612eda565b600060405180830381600087803b1580156111f257600080fd5b505af1158015611206573d6000803e3d6000fd5b50505050836040015173ffffffffffffffffffffffffffffffffffffffff1663ebecb39d8285604001516040518363ffffffff1660e01b815260040161124d92919061321e565b600060405180830381600087803b15801561126757600080fd5b505af115801561127b573d6000803e3d6000fd5b50505050846020015173ffffffffffffffffffffffffffffffffffffffff16637cdd3fde828560200151670de0b6b3a764000064e8d4a510006112be91906127b0565b6040518463ffffffff1660e01b81526004016112dc9392919061326c565b600060405180830381600087803b1580156112f657600080fd5b505af115801561130a573d6000803e3d6000fd5b50505050846020015173ffffffffffffffffffffffffffffffffffffffff16637bab3f4082856020015186602001516000670de0b6b3a764000064e8d4a5100061135491906127b0565b60006040518763ffffffff1660e01b8152600401611377969594939291906132de565b600060405180830381600087803b15801561139157600080fd5b505af11580156113a5573d6000803e3d6000fd5b50505050826020015173ffffffffffffffffffffffffffffffffffffffff1663d4e8be838660e001516040518263ffffffff1660e01b81526004016113ea9190613365565b600060405180830381600087803b15801561140457600080fd5b505af1158015611418573d6000803e3d6000fd5b50505050826040015173ffffffffffffffffffffffffffffffffffffffff1663e1f21c67846020015173ffffffffffffffffffffffffffffffffffffffff16634cf282fb6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561148b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114af9190612d0e565b85602001517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518463ffffffff1660e01b81526004016114f39392919061338c565b600060405180830381600087803b15801561150d57600080fd5b505af1158015611521573d6000803e3d6000fd5b50505050836020015173ffffffffffffffffffffffffffffffffffffffff1663daa70103828460a001516040518363ffffffff1660e01b81526004016115689291906133c3565b600060405180830381600087803b15801561158257600080fd5b505af1158015611596573d6000803e3d6000fd5b505050506115b1836020015184600001518460a00151611d80565b6115c8836040015184600001518460a00151611d80565b60006115d382611f4c565b9050856000015173ffffffffffffffffffffffffffffffffffffffff1663ca446dd961161d836040516020016116099190613474565b6040516020818303038152906040526120c9565b86602001516040518363ffffffff1660e01b815260040161163f9291906133c3565b600060405180830381600087803b15801561165957600080fd5b505af115801561166d573d6000803e3d6000fd5b50505050856000015173ffffffffffffffffffffffffffffffffffffffff1663ca446dd96116b9836040516020016116a591906134e2565b6040516020818303038152906040526120c9565b86604001516040518363ffffffff1660e01b81526004016116db9291906133c3565b600060405180830381600087803b1580156116f557600080fd5b505af1158015611709573d6000803e3d6000fd5b50505050856000015173ffffffffffffffffffffffffffffffffffffffff1663ca446dd9611755836040516020016117419190613550565b6040516020818303038152906040526120c9565b87600001516040518363ffffffff1660e01b81526004016117779291906133c3565b600060405180830381600087803b15801561179157600080fd5b505af11580156117a5573d6000803e3d6000fd5b505050508260c0015173ffffffffffffffffffffffffffffffffffffffff16634d8835e683600080600060058b6000015160006117e18b6120f2565b6117ea8c6120f2565b6040518a63ffffffff1660e01b815260040161180e999897969594939291906135de565b600060405180830381600087803b15801561182857600080fd5b505af115801561183c573d6000803e3d6000fd5b50505050505050505050565b6118506122bf565b81816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506118b2817f4d43445f5641540000000000000000000000000000000000000000000000000061222e565b816020019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611913817f4d43445f4a4f494e5f444149000000000000000000000000000000000000000061222e565b816040019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611974817f4d43445f4441490000000000000000000000000000000000000000000000000061222e565b816060019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506119d5817f4d43445f564f570000000000000000000000000000000000000000000000000061222e565b816080019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611a36817f4d43445f444f470000000000000000000000000000000000000000000000000061222e565b8160a0019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611a97817f4d43445f504f540000000000000000000000000000000000000000000000000061222e565b8160c0019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611af8817f4d43445f4a55470000000000000000000000000000000000000000000000000061222e565b8160e0019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611b59817f4d43445f53504f5400000000000000000000000000000000000000000000000061222e565b81610100019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611bbb817f4d43445f454e440000000000000000000000000000000000000000000000000061222e565b81610120019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611c1d817f4d43445f4355524500000000000000000000000000000000000000000000000061222e565b81610140019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611c7f817f4d43445f464c415000000000000000000000000000000000000000000000000061222e565b81610160019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611ce1817f4d43445f464c4f5000000000000000000000000000000000000000000000000061222e565b81610180019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611d43817f4d43445f45534d0000000000000000000000000000000000000000000000000061222e565b816101a0019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050919050565b8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160315611f475760018373ffffffffffffffffffffffffffffffffffffffff1663bf353dbb846040518263ffffffff1660e01b8152600401611def9190613679565b602060405180830381865afa158015611e0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e309190612754565b14611e70576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e67906136e0565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff166365fae35e826040518263ffffffff1660e01b8152600401611ea99190613679565b600060405180830381600087803b158015611ec357600080fd5b505af1158015611ed7573d6000803e3d6000fd5b505050508273ffffffffffffffffffffffffffffffffffffffff16639c52a7f1836040518263ffffffff1660e01b8152600401611f149190613679565b600060405180830381600087803b158015611f2e57600080fd5b505af1158015611f42573d6000803e3d6000fd5b505050505b505050565b606060005b6020811015611f92576000838260208110611f6f57611f6e613700565b5b1a60f81b60f81c60ff160315611f92578080611f8a9061372f565b915050611f51565b60008167ffffffffffffffff811115611fae57611fad612aae565b5b6040519080825280601f01601f191660200182016040528015611fe05781602001600182028036833780820191505090505b50905060005b828110156120be57600085826020811061200357612002613700565b5b1a60f81b60f81c9050602d8160ff160361206357605f60f81b83838151811061202f5761202e613700565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506120aa565b8060f81b83838151811061207a57612079613700565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b5080806120b69061372f565b915050611fe6565b508092505050919050565b60008082905060008151036120e4576000801b9150506120ed565b60208301519150505b919050565b606060005b6020811080156121435750600060f81b83826020811061211a57612119613700565b5b1a60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614155b1561215b5780806121539061372f565b9150506120f7565b60008167ffffffffffffffff81111561217757612176612aae565b5b6040519080825280601f01601f1916602001820160405280156121a95781602001600182028036833780820191505090505b50905060005b82811015612223578481602081106121ca576121c9613700565b5b1a60f81b8282815181106121e1576121e0613700565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350808061221b9061372f565b9150506121af565b508092505050919050565b6000826000015173ffffffffffffffffffffffffffffffffffffffff166321f8a721836040518263ffffffff1660e01b815260040161226d9190612eda565b602060405180830381865afa9250505080156122a757506040513d601f19601f820116820180604052508101906122a49190612d0e565b60015b6122b457600090506122b9565b809150505b92915050565b604051806101c00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b60008115159050919050565b61247781612462565b82525050565b6000602082019050612492600083018461246e565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156124d25780820151818401526020810190506124b7565b60008484015250505050565b6000601f19601f8301169050919050565b60006124fa82612498565b61250481856124a3565b93506125148185602086016124b4565b61251d816124de565b840191505092915050565b6000602082019050818103600083015261254281846124ef565b905092915050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b6125718161255e565b811461257c57600080fd5b50565b60008135905061258e81612568565b92915050565b6000602082840312156125aa576125a9612554565b5b60006125b88482850161257f565b91505092915050565b6125ca8161255e565b82525050565b60006020820190506125e560008301846125c1565b92915050565b600064ffffffffff82169050919050565b612605816125eb565b82525050565b61261481612462565b82525050565b600060408201905061262f60008301856125fc565b61263c602083018461260b565b9392505050565b61264c81612462565b811461265757600080fd5b50565b60008151905061266981612643565b92915050565b60006020828403121561268557612684612554565b5b60006126938482850161265a565b91505092915050565b7f4f757473696465206f666669636520686f757273000000000000000000000000600082015250565b60006126d26014836124a3565b91506126dd8261269c565b602082019050919050565b60006020820190508181036000830152612701816126c5565b9050919050565b600060608201905061271d60008301866125fc565b61272a60208301856125fc565b612737604083018461260b565b949350505050565b60008151905061274e81612568565b92915050565b60006020828403121561276a57612769612554565b5b60006127788482850161273f565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006127bb8261255e565b91506127c68361255e565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156127ff576127fe612781565b5b828202905092915050565b7f5049505f414c4c4f4341544f525f424c4f4f4d5f410000000000000000000000815250565b60006020820190506128446000830161280a565b919050565b7f414c4c4f4341544f522d424c4f4f4d2d41000000000000000000000000000000815250565b600060208201905061288360008301612849565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006128b382612888565b9050919050565b6128c3816128a8565b82525050565b7f686f700000000000000000000000000000000000000000000000000000000000815250565b6000819050919050565b6000819050919050565b600061291e612919612914846128ef565b6128f9565b61255e565b9050919050565b61292e81612903565b82525050565b600060608201905061294960008301856128ba565b612955602083016128c9565b6129626040830184612925565b9392505050565b61297281612903565b82525050565b600060208201905061298d6000830184612969565b92915050565b600082825260208201905092915050565b7f312e31392e380000000000000000000000000000000000000000000000000000600082015250565b60006129da600683612993565b91506129e5826129a4565b602082019050919050565b60006020820190508181036000830152612a09816129cd565b9050919050565b612a19816128a8565b82525050565b600081519050919050565b600082825260208201905092915050565b6000612a4682612a1f565b612a508185612a2a565b9350612a608185602086016124b4565b612a69816124de565b840191505092915050565b6000604082019050612a896000830185612a10565b8181036020830152612a9b8184612a3b565b90509392505050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612ae6826124de565b810181811067ffffffffffffffff82111715612b0557612b04612aae565b5b80604052505050565b6000612b1861254a565b9050612b248282612add565b919050565b600067ffffffffffffffff821115612b4457612b43612aae565b5b612b4d826124de565b9050602081019050919050565b6000612b6d612b6884612b29565b612b0e565b905082815260208101848484011115612b8957612b88612aa9565b5b612b948482856124b4565b509392505050565b600082601f830112612bb157612bb0612aa4565b5b8151612bc1848260208601612b5a565b91505092915050565b600060208284031215612be057612bdf612554565b5b600082015167ffffffffffffffff811115612bfe57612bfd612559565b5b612c0a84828501612b9c565b91505092915050565b6000819050919050565b612c2681612c13565b8114612c3157600080fd5b50565b600081519050612c4381612c1d565b92915050565b600060208284031215612c5f57612c5e612554565b5b6000612c6d84828501612c34565b91505092915050565b7f416c6c6f6361746f72496e69742f7661756c742d696c6b2d6d69736d61746368600082015250565b6000612cac6020836124a3565b9150612cb782612c76565b602082019050919050565b60006020820190508181036000830152612cdb81612c9f565b9050919050565b612ceb816128a8565b8114612cf657600080fd5b50565b600081519050612d0881612ce2565b92915050565b600060208284031215612d2457612d23612554565b5b6000612d3284828501612cf9565b91505092915050565b7f416c6c6f6361746f72496e69742f7661756c742d726f6c65732d6d69736d617460008201527f6368000000000000000000000000000000000000000000000000000000000000602082015250565b6000612d976022836124a3565b9150612da282612d3b565b604082019050919050565b60006020820190508181036000830152612dc681612d8a565b9050919050565b7f416c6c6f6361746f72496e69742f7661756c742d6275666665722d6d69736d6160008201527f7463680000000000000000000000000000000000000000000000000000000000602082015250565b6000612e296023836124a3565b9150612e3482612dcd565b604082019050919050565b60006020820190508181036000830152612e5881612e1c565b9050919050565b7f416c6c6f6361746f72496e69742f7661756c742d7661742d6d69736d61746368600082015250565b6000612e956020836124a3565b9150612ea082612e5f565b602082019050919050565b60006020820190508181036000830152612ec481612e88565b9050919050565b612ed481612c13565b82525050565b6000602082019050612eef6000830184612ecb565b92915050565b7f416c6c6f6361746f72496e69742f696c6b2d647574792d6f75742d6f662d626f60008201527f756e647300000000000000000000000000000000000000000000000000000000602082015250565b6000612f516024836124a3565b9150612f5c82612ef5565b604082019050919050565b60006020820190508181036000830152612f8081612f44565b9050919050565b7f6475747900000000000000000000000000000000000000000000000000000000815250565b6000606082019050612fc26000830185612ecb565b612fce60208301612f87565b612fdb60408301846125c1565b9392505050565b7f6c696e6500000000000000000000000000000000000000000000000000000000815250565b600060608201905061301d6000830185612ecb565b61302960208301612fe2565b61303660408301846125c1565b9392505050565b60006130488261255e565b91506130538361255e565b925082820190508082111561306b5761306a612781565b5b92915050565b7f4c696e6500000000000000000000000000000000000000000000000000000000815250565b60006040820190506130ab60008301613071565b6130b860208301846125c1565b92915050565b7f4d43445f49414d5f4155544f5f4c494e45000000000000000000000000000000815250565b60006020820190506130f8600083016130be565b919050565b60006080820190506131126000830187612ecb565b61311f60208301866125c1565b61312c60408301856125c1565b61313960608301846125c1565b95945050505050565b7f7069700000000000000000000000000000000000000000000000000000000000815250565b600060608201905061317d6000830185612ecb565b61318960208301613142565b6131966040830184612a10565b9392505050565b7f6d61740000000000000000000000000000000000000000000000000000000000815250565b60006060820190506131d86000830185612ecb565b6131e46020830161319d565b6131f160408301846125c1565b9392505050565b7f6275666665720000000000000000000000000000000000000000000000000000815250565b60006060820190506132336000830185612ecb565b61323f602083016131f8565b61324c6040830184612a10565b9392505050565b6000819050919050565b61326681613253565b82525050565b60006060820190506132816000830186612ecb565b61328e6020830185612a10565b61329b604083018461325d565b949350505050565b6000819050919050565b60006132c86132c36132be846132a3565b6128f9565b613253565b9050919050565b6132d8816132ad565b82525050565b600060c0820190506132f36000830189612ecb565b6133006020830188612a10565b61330d6040830187612a10565b61331a6060830186612a10565b613327608083018561325d565b61333460a08301846132cf565b979650505050505050565b7f6a75670000000000000000000000000000000000000000000000000000000000815250565b60006040820190506133796000830161333f565b6133866020830184612a10565b92915050565b60006060820190506133a16000830186612a10565b6133ae6020830185612a10565b6133bb60408301846125c1565b949350505050565b60006040820190506133d86000830185612ecb565b6133e56020830184612a10565b9392505050565b600081905092915050565b600061340282612498565b61340c81856133ec565b935061341c8185602086016124b4565b80840191505092915050565b7f5f5641554c540000000000000000000000000000000000000000000000000000600082015250565b600061345e6006836133ec565b915061346982613428565b600682019050919050565b600061348082846133f7565b915061348b82613451565b915081905092915050565b7f5f42554646455200000000000000000000000000000000000000000000000000600082015250565b60006134cc6007836133ec565b91506134d782613496565b600782019050919050565b60006134ee82846133f7565b91506134f9826134bf565b915081905092915050565b7f5049505f00000000000000000000000000000000000000000000000000000000600082015250565b600061353a6004836133ec565b915061354582613504565b600482019050919050565b600061355b8261352d565b915061356782846133f7565b915081905092915050565b600061358d613588613583846132a3565b6128f9565b61255e565b9050919050565b61359d81613572565b82525050565b6000819050919050565b60006135c86135c36135be846135a3565b6128f9565b61255e565b9050919050565b6135d8816135ad565b82525050565b6000610120820190506135f4600083018c612ecb565b613601602083018b612a10565b61360e604083018a612a10565b61361b6060830189613594565b61362860808301886135cf565b61363560a0830187612a10565b61364260c0830186612a10565b81810360e083015261365481856124ef565b905081810361010083015261366981846124ef565b90509a9950505050505050505050565b600060208201905061368e6000830184612a10565b92915050565b7f6465706c6f7965722d6e6f742d61757468656400000000000000000000000000600082015250565b60006136ca6013836124a3565b91506136d582613694565b602082019050919050565b600060208201905081810360008301526136f9816136bd565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600061373a8261255e565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361376c5761376b612781565b5b60018201905091905056fe323032352d30342d3033204d616b657244414f20457865637574697665205370656c6c207c20486173683a203078343732643436363138623036393238653234386237666636643939613161623334333832386564386133653762636438646234343333633939616165373737666261666b726569646d756d6a6b6368366873746b3771736c797433646c66616b6762356f69376233616162376d716a3636766b6473366e67326465a26469706673582212208181438d9d35f3c323c606e235bb1459bd9d169a5ab673bab6152f225f71e1cc64736f6c63430008100033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100ce5760003560e01c80637284e4161161008c578063ae8421e111610066578063ae8421e1146101cd578063b0604a26146101eb578063f7992d85146101f5578063fe7d47bb14610213576100ce565b80637284e416146101875780638456cb59146101a557806396d373e5146101c3576100ce565b8062a7029b146100d35780630a7a1c4d146100f15780634665096d1461010f57806351973ec91461012d57806351f910661461014b5780636e832f0714610169575b600080fd5b6100db610231565b6040516100e89190610959565b60405180910390f35b6100f96102bf565b60405161010691906109bc565b60405180910390f35b6101176102e3565b60405161012491906109f0565b60405180910390f35b610135610307565b6040516101429190610a6a565b60405180910390f35b61015361031f565b6040516101609190610a9e565b60405180910390f35b610171610343565b60405161017e9190610ad4565b60405180910390f35b61018f6103d9565b60405161019c9190610b44565b60405180910390f35b6101ad610474565b6040516101ba9190610b87565b60405180910390f35b6101cb610498565b005b6101d56105f0565b6040516101e29190610ad4565b60405180910390f35b6101f3610603565b005b6101fd610820565b60405161020a91906109f0565b60405180910390f35b61021b610826565b60405161022891906109f0565b60405180910390f35b6001805461023e90610bd1565b80601f016020809104026020016040519081016040528092919081815260200182805461026a90610bd1565b80156102b75780601f1061028c576101008083540402835291602001916102b7565b820191906000526020600020905b81548152906001019060200180831161029a57829003601f168201915b505050505081565b7f000000000000000000000000382152b71e66ca54bf6567f7c1ae8c00050c74f481565b7f000000000000000000000000000000000000000000000000000000006816298781565b73da0ab1e0017debcd72be8599041a2aa3ba7e740f81565b7f73e7ebde184746699cb131ee09b338604a120a7218b250c9d70e4add7c0c415381565b60007f000000000000000000000000382152b71e66ca54bf6567f7c1ae8c00050c74f473ffffffffffffffffffffffffffffffffffffffff16636e832f076040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103d49190610c42565b905090565b60607f000000000000000000000000382152b71e66ca54bf6567f7c1ae8c00050c74f473ffffffffffffffffffffffffffffffffffffffff16637284e4166040518163ffffffff1660e01b8152600401600060405180830381865afa158015610446573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061046f9190610d95565b905090565b7f000000000000000000000000be286431454714f511008713973d3b053a2d38f381565b600260009054906101000a900460ff16156104e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104df90610e2a565b60405180910390fd5b6001600260006101000a81548160ff0219169083151502179055507f000000000000000000000000be286431454714f511008713973d3b053a2d38f373ffffffffffffffffffffffffffffffffffffffff1663168ccd677f000000000000000000000000382152b71e66ca54bf6567f7c1ae8c00050c74f47f73e7ebde184746699cb131ee09b338604a120a7218b250c9d70e4add7c0c415360016000546040518563ffffffff1660e01b81526004016105a59493929190610ee3565b6000604051808303816000875af11580156105c4573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906105ed9190610fd0565b50565b600260009054906101000a900460ff1681565b7f0000000000000000000000000000000000000000000000000000000068162987421115610666576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161065d90611065565b60405180910390fd5b60008054146106aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106a1906110f7565b60405180910390fd5b7f000000000000000000000000be286431454714f511008713973d3b053a2d38f373ffffffffffffffffffffffffffffffffffffffff16636a42b8f86040518163ffffffff1660e01b8152600401602060405180830381865afa158015610715573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107399190611143565b42610744919061119f565b6000819055507f000000000000000000000000be286431454714f511008713973d3b053a2d38f373ffffffffffffffffffffffffffffffffffffffff166346d2fbbb7f000000000000000000000000382152b71e66ca54bf6567f7c1ae8c00050c74f47f73e7ebde184746699cb131ee09b338604a120a7218b250c9d70e4add7c0c415360016000546040518563ffffffff1660e01b81526004016107ec9493929190610ee3565b600060405180830381600087803b15801561080657600080fd5b505af115801561081a573d6000803e3d6000fd5b50505050565b60005481565b60007f000000000000000000000000382152b71e66ca54bf6567f7c1ae8c00050c74f473ffffffffffffffffffffffffffffffffffffffff1663bf0fbcec6000546040518263ffffffff1660e01b815260040161088391906109f0565b602060405180830381865afa1580156108a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c49190611143565b905090565b600081519050919050565b600082825260208201905092915050565b60005b838110156109035780820151818401526020810190506108e8565b60008484015250505050565b6000601f19601f8301169050919050565b600061092b826108c9565b61093581856108d4565b93506109458185602086016108e5565b61094e8161090f565b840191505092915050565b600060208201905081810360008301526109738184610920565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006109a68261097b565b9050919050565b6109b68161099b565b82525050565b60006020820190506109d160008301846109ad565b92915050565b6000819050919050565b6109ea816109d7565b82525050565b6000602082019050610a0560008301846109e1565b92915050565b6000819050919050565b6000610a30610a2b610a268461097b565b610a0b565b61097b565b9050919050565b6000610a4282610a15565b9050919050565b6000610a5482610a37565b9050919050565b610a6481610a49565b82525050565b6000602082019050610a7f6000830184610a5b565b92915050565b6000819050919050565b610a9881610a85565b82525050565b6000602082019050610ab36000830184610a8f565b92915050565b60008115159050919050565b610ace81610ab9565b82525050565b6000602082019050610ae96000830184610ac5565b92915050565b600081519050919050565b600082825260208201905092915050565b6000610b1682610aef565b610b208185610afa565b9350610b308185602086016108e5565b610b398161090f565b840191505092915050565b60006020820190508181036000830152610b5e8184610b0b565b905092915050565b6000610b7182610a37565b9050919050565b610b8181610b66565b82525050565b6000602082019050610b9c6000830184610b78565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680610be957607f821691505b602082108103610bfc57610bfb610ba2565b5b50919050565b6000604051905090565b600080fd5b600080fd5b610c1f81610ab9565b8114610c2a57600080fd5b50565b600081519050610c3c81610c16565b92915050565b600060208284031215610c5857610c57610c0c565b5b6000610c6684828501610c2d565b91505092915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610cb18261090f565b810181811067ffffffffffffffff82111715610cd057610ccf610c79565b5b80604052505050565b6000610ce3610c02565b9050610cef8282610ca8565b919050565b600067ffffffffffffffff821115610d0f57610d0e610c79565b5b610d188261090f565b9050602081019050919050565b6000610d38610d3384610cf4565b610cd9565b905082815260208101848484011115610d5457610d53610c74565b5b610d5f8482856108e5565b509392505050565b600082601f830112610d7c57610d7b610c6f565b5b8151610d8c848260208601610d25565b91505092915050565b600060208284031215610dab57610daa610c0c565b5b600082015167ffffffffffffffff811115610dc957610dc8610c11565b5b610dd584828501610d67565b91505092915050565b7f7370656c6c2d616c72656164792d636173740000000000000000000000000000600082015250565b6000610e14601283610afa565b9150610e1f82610dde565b602082019050919050565b60006020820190508181036000830152610e4381610e07565b9050919050565b60008190508160005260206000209050919050565b60008154610e6c81610bd1565b610e7681866108d4565b94506001821660008114610e915760018114610ea757610eda565b60ff198316865281151560200286019350610eda565b610eb085610e4a565b60005b83811015610ed257815481890152600182019150602081019050610eb3565b808801955050505b50505092915050565b6000608082019050610ef860008301876109ad565b610f056020830186610a8f565b8181036040830152610f178185610e5f565b9050610f2660608301846109e1565b95945050505050565b600067ffffffffffffffff821115610f4a57610f49610c79565b5b610f538261090f565b9050602081019050919050565b6000610f73610f6e84610f2f565b610cd9565b905082815260208101848484011115610f8f57610f8e610c74565b5b610f9a8482856108e5565b509392505050565b600082601f830112610fb757610fb6610c6f565b5b8151610fc7848260208601610f60565b91505092915050565b600060208284031215610fe657610fe5610c0c565b5b600082015167ffffffffffffffff81111561100457611003610c11565b5b61101084828501610fa2565b91505092915050565b7f5468697320636f6e747261637420686173206578706972656400000000000000600082015250565b600061104f601983610afa565b915061105a82611019565b602082019050919050565b6000602082019050818103600083015261107e81611042565b9050919050565b7f54686973207370656c6c2068617320616c7265616479206265656e207363686560008201527f64756c6564000000000000000000000000000000000000000000000000000000602082015250565b60006110e1602583610afa565b91506110ec82611085565b604082019050919050565b60006020820190508181036000830152611110816110d4565b9050919050565b611120816109d7565b811461112b57600080fd5b50565b60008151905061113d81611117565b92915050565b60006020828403121561115957611158610c0c565b5b60006111678482850161112e565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006111aa826109d7565b91506111b5836109d7565b92508282019050808211156111cd576111cc611170565b5b9291505056fea26469706673582212203b20d69f34f080094b7613d3420ca1a0675246ce4e1ac15199d1aeff86bec9bd64736f6c63430008100033
Deployed Bytecode Sourcemap
278176:121:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3158:34;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3282:37;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3326:41;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3018:92;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3241:34;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3776:111;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3648:120;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3374:36;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;5037:144;;;:::i;:::-;;3199:35;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4740:289;;;:::i;:::-;;3117:34;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3895:128;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3158:34;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;3282:37::-;;;:::o;3326:41::-;;;:::o;3018:92::-;3067:42;3018:92;:::o;3241:34::-;;;:::o;3776:111::-;3822:4;3858:6;3846:31;;;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3839:40;;3776:111;:::o;3648:120::-;3694:13;3739:6;3727:31;;;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3720:40;;3648:120;:::o;3374:36::-;;;:::o;5037:144::-;5080:4;;;;;;;;;;;5079:5;5071:36;;;;;;;;;;;;:::i;:::-;;;;;;;;;5125:4;5118;;:11;;;;;;;;;;;;;;;;;;5140:5;:10;;;5151:6;5159:3;5164;5169;;5140:33;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;5037:144::o;3199:35::-;;;;;;;;;;;;;:::o;4740:289::-;4805:10;4786:15;:29;;4778:67;;;;;;;;;;;;:::i;:::-;;;;;;;;;4871:1;4864:3;;:8;4856:58;;;;;;;;;;;;:::i;:::-;;;;;;;;;4963:5;4949:26;;;:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4931:15;:46;;;;:::i;:::-;4925:3;:52;;;;4988:5;:10;;;4999:6;5007:3;5012;5017;;4988:33;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4740:289::o;3117:34::-;;;;:::o;3895:128::-;3942:16;3990:6;3978:32;;;4011:3;;3978:37;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3971:44;;3895:128;:::o;7:98:1:-;58:6;92:5;86:12;76:22;;7:98;;;:::o;111:168::-;194:11;228:6;223:3;216:19;268:4;263:3;259:14;244:29;;111:168;;;;:::o;285:246::-;366:1;376:113;390:6;387:1;384:13;376:113;;;475:1;470:3;466:11;460:18;456:1;451:3;447:11;440:39;412:2;409:1;405:10;400:15;;376:113;;;523:1;514:6;509:3;505:16;498:27;347:184;285:246;;;:::o;537:102::-;578:6;629:2;625:7;620:2;613:5;609:14;605:28;595:38;;537:102;;;:::o;645:373::-;731:3;759:38;791:5;759:38;:::i;:::-;813:70;876:6;871:3;813:70;:::i;:::-;806:77;;892:65;950:6;945:3;938:4;931:5;927:16;892:65;:::i;:::-;982:29;1004:6;982:29;:::i;:::-;977:3;973:39;966:46;;735:283;645:373;;;;:::o;1024:309::-;1135:4;1173:2;1162:9;1158:18;1150:26;;1222:9;1216:4;1212:20;1208:1;1197:9;1193:17;1186:47;1250:76;1321:4;1312:6;1250:76;:::i;:::-;1242:84;;1024:309;;;;:::o;1339:126::-;1376:7;1416:42;1409:5;1405:54;1394:65;;1339:126;;;:::o;1471:96::-;1508:7;1537:24;1555:5;1537:24;:::i;:::-;1526:35;;1471:96;;;:::o;1573:118::-;1660:24;1678:5;1660:24;:::i;:::-;1655:3;1648:37;1573:118;;:::o;1697:222::-;1790:4;1828:2;1817:9;1813:18;1805:26;;1841:71;1909:1;1898:9;1894:17;1885:6;1841:71;:::i;:::-;1697:222;;;;:::o;1925:77::-;1962:7;1991:5;1980:16;;1925:77;;;:::o;2008:118::-;2095:24;2113:5;2095:24;:::i;:::-;2090:3;2083:37;2008:118;;:::o;2132:222::-;2225:4;2263:2;2252:9;2248:18;2240:26;;2276:71;2344:1;2333:9;2329:17;2320:6;2276:71;:::i;:::-;2132:222;;;;:::o;2360:60::-;2388:3;2409:5;2402:12;;2360:60;;;:::o;2426:142::-;2476:9;2509:53;2527:34;2536:24;2554:5;2536:24;:::i;:::-;2527:34;:::i;:::-;2509:53;:::i;:::-;2496:66;;2426:142;;;:::o;2574:126::-;2624:9;2657:37;2688:5;2657:37;:::i;:::-;2644:50;;2574:126;;;:::o;2706:142::-;2772:9;2805:37;2836:5;2805:37;:::i;:::-;2792:50;;2706:142;;;:::o;2854:163::-;2957:53;3004:5;2957:53;:::i;:::-;2952:3;2945:66;2854:163;;:::o;3023:254::-;3132:4;3170:2;3159:9;3155:18;3147:26;;3183:87;3267:1;3256:9;3252:17;3243:6;3183:87;:::i;:::-;3023:254;;;;:::o;3283:77::-;3320:7;3349:5;3338:16;;3283:77;;;:::o;3366:118::-;3453:24;3471:5;3453:24;:::i;:::-;3448:3;3441:37;3366:118;;:::o;3490:222::-;3583:4;3621:2;3610:9;3606:18;3598:26;;3634:71;3702:1;3691:9;3687:17;3678:6;3634:71;:::i;:::-;3490:222;;;;:::o;3718:90::-;3752:7;3795:5;3788:13;3781:21;3770:32;;3718:90;;;:::o;3814:109::-;3895:21;3910:5;3895:21;:::i;:::-;3890:3;3883:34;3814:109;;:::o;3929:210::-;4016:4;4054:2;4043:9;4039:18;4031:26;;4067:65;4129:1;4118:9;4114:17;4105:6;4067:65;:::i;:::-;3929:210;;;;:::o;4145:99::-;4197:6;4231:5;4225:12;4215:22;;4145:99;;;:::o;4250:169::-;4334:11;4368:6;4363:3;4356:19;4408:4;4403:3;4399:14;4384:29;;4250:169;;;;:::o;4425:377::-;4513:3;4541:39;4574:5;4541:39;:::i;:::-;4596:71;4660:6;4655:3;4596:71;:::i;:::-;4589:78;;4676:65;4734:6;4729:3;4722:4;4715:5;4711:16;4676:65;:::i;:::-;4766:29;4788:6;4766:29;:::i;:::-;4761:3;4757:39;4750:46;;4517:285;4425:377;;;;:::o;4808:313::-;4921:4;4959:2;4948:9;4944:18;4936:26;;5008:9;5002:4;4998:20;4994:1;4983:9;4979:17;4972:47;5036:78;5109:4;5100:6;5036:78;:::i;:::-;5028:86;;4808:313;;;;:::o;5127:146::-;5197:9;5230:37;5261:5;5230:37;:::i;:::-;5217:50;;5127:146;;;:::o;5279:171::-;5386:57;5437:5;5386:57;:::i;:::-;5381:3;5374:70;5279:171;;:::o;5456:262::-;5569:4;5607:2;5596:9;5592:18;5584:26;;5620:91;5708:1;5697:9;5693:17;5684:6;5620:91;:::i;:::-;5456:262;;;;:::o;5724:180::-;5772:77;5769:1;5762:88;5869:4;5866:1;5859:15;5893:4;5890:1;5883:15;5910:320;5954:6;5991:1;5985:4;5981:12;5971:22;;6038:1;6032:4;6028:12;6059:18;6049:81;;6115:4;6107:6;6103:17;6093:27;;6049:81;6177:2;6169:6;6166:14;6146:18;6143:38;6140:84;;6196:18;;:::i;:::-;6140:84;5961:269;5910:320;;;:::o;6236:75::-;6269:6;6302:2;6296:9;6286:19;;6236:75;:::o;6317:117::-;6426:1;6423;6416:12;6440:117;6549:1;6546;6539:12;6563:116;6633:21;6648:5;6633:21;:::i;:::-;6626:5;6623:32;6613:60;;6669:1;6666;6659:12;6613:60;6563:116;:::o;6685:137::-;6739:5;6770:6;6764:13;6755:22;;6786:30;6810:5;6786:30;:::i;:::-;6685:137;;;;:::o;6828:345::-;6895:6;6944:2;6932:9;6923:7;6919:23;6915:32;6912:119;;;6950:79;;:::i;:::-;6912:119;7070:1;7095:61;7148:7;7139:6;7128:9;7124:22;7095:61;:::i;:::-;7085:71;;7041:125;6828:345;;;;:::o;7179:117::-;7288:1;7285;7278:12;7302:117;7411:1;7408;7401:12;7425:180;7473:77;7470:1;7463:88;7570:4;7567:1;7560:15;7594:4;7591:1;7584:15;7611:281;7694:27;7716:4;7694:27;:::i;:::-;7686:6;7682:40;7824:6;7812:10;7809:22;7788:18;7776:10;7773:34;7770:62;7767:88;;;7835:18;;:::i;:::-;7767:88;7875:10;7871:2;7864:22;7654:238;7611:281;;:::o;7898:129::-;7932:6;7959:20;;:::i;:::-;7949:30;;7988:33;8016:4;8008:6;7988:33;:::i;:::-;7898:129;;;:::o;8033:308::-;8095:4;8185:18;8177:6;8174:30;8171:56;;;8207:18;;:::i;:::-;8171:56;8245:29;8267:6;8245:29;:::i;:::-;8237:37;;8329:4;8323;8319:15;8311:23;;8033:308;;;:::o;8347:434::-;8436:5;8461:66;8477:49;8519:6;8477:49;:::i;:::-;8461:66;:::i;:::-;8452:75;;8550:6;8543:5;8536:21;8588:4;8581:5;8577:16;8626:3;8617:6;8612:3;8608:16;8605:25;8602:112;;;8633:79;;:::i;:::-;8602:112;8723:52;8768:6;8763:3;8758;8723:52;:::i;:::-;8442:339;8347:434;;;;;:::o;8801:355::-;8868:5;8917:3;8910:4;8902:6;8898:17;8894:27;8884:122;;8925:79;;:::i;:::-;8884:122;9035:6;9029:13;9060:90;9146:3;9138:6;9131:4;9123:6;9119:17;9060:90;:::i;:::-;9051:99;;8874:282;8801:355;;;;:::o;9162:524::-;9242:6;9291:2;9279:9;9270:7;9266:23;9262:32;9259:119;;;9297:79;;:::i;:::-;9259:119;9438:1;9427:9;9423:17;9417:24;9468:18;9460:6;9457:30;9454:117;;;9490:79;;:::i;:::-;9454:117;9595:74;9661:7;9652:6;9641:9;9637:22;9595:74;:::i;:::-;9585:84;;9388:291;9162:524;;;;:::o;9692:168::-;9832:20;9828:1;9820:6;9816:14;9809:44;9692:168;:::o;9866:366::-;10008:3;10029:67;10093:2;10088:3;10029:67;:::i;:::-;10022:74;;10105:93;10194:3;10105:93;:::i;:::-;10223:2;10218:3;10214:12;10207:19;;9866:366;;;:::o;10238:419::-;10404:4;10442:2;10431:9;10427:18;10419:26;;10491:9;10485:4;10481:20;10477:1;10466:9;10462:17;10455:47;10519:131;10645:4;10519:131;:::i;:::-;10511:139;;10238:419;;;:::o;10663:140::-;10711:4;10734:3;10726:11;;10757:3;10754:1;10747:14;10791:4;10788:1;10778:18;10770:26;;10663:140;;;:::o;10831:827::-;10914:3;10951:5;10945:12;10980:36;11006:9;10980:36;:::i;:::-;11032:70;11095:6;11090:3;11032:70;:::i;:::-;11025:77;;11133:1;11122:9;11118:17;11149:1;11144:164;;;;11322:1;11317:335;;;;11111:541;;11144:164;11228:4;11224:9;11213;11209:25;11204:3;11197:38;11288:6;11281:14;11274:22;11268:4;11264:33;11259:3;11255:43;11248:50;;11144:164;;11317:335;11384:37;11415:5;11384:37;:::i;:::-;11443:1;11457:154;11471:6;11468:1;11465:13;11457:154;;;11545:7;11539:14;11535:1;11530:3;11526:11;11519:35;11595:1;11586:7;11582:15;11571:26;;11493:4;11490:1;11486:12;11481:17;;11457:154;;;11640:1;11635:3;11631:11;11624:18;;11324:328;;11111:541;;10918:740;;10831:827;;;;:::o;11664:634::-;11856:4;11894:3;11883:9;11879:19;11871:27;;11908:71;11976:1;11965:9;11961:17;11952:6;11908:71;:::i;:::-;11989:72;12057:2;12046:9;12042:18;12033:6;11989:72;:::i;:::-;12108:9;12102:4;12098:20;12093:2;12082:9;12078:18;12071:48;12136:73;12204:4;12195:6;12136:73;:::i;:::-;12128:81;;12219:72;12287:2;12276:9;12272:18;12263:6;12219:72;:::i;:::-;11664:634;;;;;;;:::o;12304:307::-;12365:4;12455:18;12447:6;12444:30;12441:56;;;12477:18;;:::i;:::-;12441:56;12515:29;12537:6;12515:29;:::i;:::-;12507:37;;12599:4;12593;12589:15;12581:23;;12304:307;;;:::o;12617:432::-;12705:5;12730:65;12746:48;12787:6;12746:48;:::i;:::-;12730:65;:::i;:::-;12721:74;;12818:6;12811:5;12804:21;12856:4;12849:5;12845:16;12894:3;12885:6;12880:3;12876:16;12873:25;12870:112;;;12901:79;;:::i;:::-;12870:112;12991:52;13036:6;13031:3;13026;12991:52;:::i;:::-;12711:338;12617:432;;;;;:::o;13068:353::-;13134:5;13183:3;13176:4;13168:6;13164:17;13160:27;13150:122;;13191:79;;:::i;:::-;13150:122;13301:6;13295:13;13326:89;13411:3;13403:6;13396:4;13388:6;13384:17;13326:89;:::i;:::-;13317:98;;13140:281;13068:353;;;;:::o;13427:522::-;13506:6;13555:2;13543:9;13534:7;13530:23;13526:32;13523:119;;;13561:79;;:::i;:::-;13523:119;13702:1;13691:9;13687:17;13681:24;13732:18;13724:6;13721:30;13718:117;;;13754:79;;:::i;:::-;13718:117;13859:73;13924:7;13915:6;13904:9;13900:22;13859:73;:::i;:::-;13849:83;;13652:290;13427:522;;;;:::o;13955:175::-;14095:27;14091:1;14083:6;14079:14;14072:51;13955:175;:::o;14136:366::-;14278:3;14299:67;14363:2;14358:3;14299:67;:::i;:::-;14292:74;;14375:93;14464:3;14375:93;:::i;:::-;14493:2;14488:3;14484:12;14477:19;;14136:366;;;:::o;14508:419::-;14674:4;14712:2;14701:9;14697:18;14689:26;;14761:9;14755:4;14751:20;14747:1;14736:9;14732:17;14725:47;14789:131;14915:4;14789:131;:::i;:::-;14781:139;;14508:419;;;:::o;14933:224::-;15073:34;15069:1;15061:6;15057:14;15050:58;15142:7;15137:2;15129:6;15125:15;15118:32;14933:224;:::o;15163:366::-;15305:3;15326:67;15390:2;15385:3;15326:67;:::i;:::-;15319:74;;15402:93;15491:3;15402:93;:::i;:::-;15520:2;15515:3;15511:12;15504:19;;15163:366;;;:::o;15535:419::-;15701:4;15739:2;15728:9;15724:18;15716:26;;15788:9;15782:4;15778:20;15774:1;15763:9;15759:17;15752:47;15816:131;15942:4;15816:131;:::i;:::-;15808:139;;15535:419;;;:::o;15960:122::-;16033:24;16051:5;16033:24;:::i;:::-;16026:5;16023:35;16013:63;;16072:1;16069;16062:12;16013:63;15960:122;:::o;16088:143::-;16145:5;16176:6;16170:13;16161:22;;16192:33;16219:5;16192:33;:::i;:::-;16088:143;;;;:::o;16237:351::-;16307:6;16356:2;16344:9;16335:7;16331:23;16327:32;16324:119;;;16362:79;;:::i;:::-;16324:119;16482:1;16507:64;16563:7;16554:6;16543:9;16539:22;16507:64;:::i;:::-;16497:74;;16453:128;16237:351;;;;:::o;16594:180::-;16642:77;16639:1;16632:88;16739:4;16736:1;16729:15;16763:4;16760:1;16753:15;16780:191;16820:3;16839:20;16857:1;16839:20;:::i;:::-;16834:25;;16873:20;16891:1;16873:20;:::i;:::-;16868:25;;16916:1;16913;16909:9;16902:16;;16937:3;16934:1;16931:10;16928:36;;;16944:18;;:::i;:::-;16928:36;16780:191;;;;:::o
Swarm Source
ipfs://8181438d9d35f3c323c606e235bb1459bd9d169a5ab673bab6152f225f71e1cc
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
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.