Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add USDT as a collateral type. #1

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
fbb8466
PE-1095 (#113)
hexonaut Oct 4, 2022
9e87988
port from spells-mainnet (#115)
julienmartinlevrai Oct 6, 2022
d4c78b9
PE-1098: 2022-10-12 Executive (Goerli) (#116)
julienmartinlevrai Oct 13, 2022
2156ae6
PE-1102: 2022-10-19 Executive (#119)
iamchrissmith Oct 17, 2022
6e8db68
`hash-exec-copy.sh` (#117)
naszam Oct 18, 2022
a8455b5
Add `ETHERSCAN_API_KEY` check in `deploy.sh` (#118)
naszam Oct 18, 2022
f1327b4
PE-1105: 2022-10-26 Executive (Goerli) (#124)
The-Arbiter Oct 27, 2022
ccee42f
PE-1109: Novmber 9th, 2022 Exec (#131)
rockyfour Nov 8, 2022
8c98461
Remove action code hash check, done correctly in test_bytecode_matche…
rockyfour Nov 9, 2022
4a15ab6
PE-1117: November Debt Exposure Executive (#138)
godsflaw Nov 12, 2022
88413f5
PE-1114 2022-11-16 Executive vote (Goerli) (#137)
gbalabasquer Nov 15, 2022
7f45ba7
feat: draft GNO onboarding
nduchak Nov 22, 2022
078967f
feat: deploy clip and calc
nduchak Nov 22, 2022
3ca0933
chore: deploy GNO dummy token \and gemjoin
nduchak Nov 22, 2022
fb432d0
added starknet piece
hexonaut Nov 23, 2022
fb53108
remove unused interfaces
hexonaut Nov 23, 2022
6e6384e
chore: add ABIEncoderV2
nduchak Nov 24, 2022
092fd72
fix tests
hexonaut Nov 24, 2022
5d61072
turn liquidations on for GUSD-A, USDC-A and PAXUSD-A (USDP)
hexonaut Nov 25, 2022
65f31e1
fix address for GUSD
hexonaut Nov 25, 2022
1fbb3c0
fix configs for stablecoins
hexonaut Nov 25, 2022
6846757
chore: fix condif
nduchak Nov 28, 2022
802c5d5
address all review comments
hexonaut Nov 28, 2022
c7f00f8
fix: issues regarding higher liquidation ratio on GNO
amusingaxl Nov 28, 2022
28301d2
chore: fix changelog version
nduchak Nov 28, 2022
a5926d0
Merge remote-tracking branch 'origin/PE-1119' into feat/GNO-onboarding
nduchak Nov 28, 2022
eff659e
chore: bump version
nduchak Nov 29, 2022
df76df2
chore: fix clliper test
nduchak Nov 29, 2022
91c24eb
chore: remove previouse spell code
nduchak Nov 29, 2022
9b00eb8
feat: offboard renbtc
dbkbali Nov 29, 2022
5d4706b
feat: offboard renbtc - update config
dbkbali Nov 30, 2022
d2cc32e
Add new collateral spell of USDT
May 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# EditorConfig for MakerDAO Projects

# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{sol,sh,js,py}]
indent_style = space
indent_size = 4

[*.{diff,md}]
trim_trailing_whitespace = false

[{package.json,.travis.yml}]
indent_style = space
indent_size = 2

[foundry.toml]
indent_style = space
indent_size = 4
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ all :; DAPP_LIBRARIES=' lib/dss-exec-lib/src/DssExecLib.sol:DssEx
dapp --use solc:0.6.12 build
clean :; dapp clean
# Usage example: make test match=SpellIsCast
test :; ./scripts/test-dssspell.sh match="$(match)" optimizer="$(optimizer)" optimizer-runs="$(optimizer-runs)" block="$(block)"
test :; ./scripts/test-dssspell-forge.sh match="$(match)" block="$(block)"
test-forge :; ./scripts/test-dssspell-forge.sh match="$(match)" block="$(block)"
test-dapp :; ./scripts/test-dssspell.sh match="$(match)" optimizer="$(optimizer)" optimizer-runs="$(optimizer-runs)" block="$(block)"
estimate :; ./scripts/estimate-deploy-gas.sh
deploy :; ./scripts/deploy.sh
deploy-stamp :; ./scripts/get-created-timestamp.sh tx=$(tx)
Expand All @@ -14,3 +15,4 @@ archive-spell :; ./scripts/archive-dssspell.sh "$(if $(date),$(date),$(shel
diff-archive-spell :; ./scripts/diff-archive-dssspell.sh "$(if $(date),$(date),$(shell date +'%Y-%m-%d'))"
wards :; ./scripts/wards.sh $(target)
time :; ./scripts/time.sh date="$(date)" stamp="$(stamp)"
exec-hash :; ./scripts/hash-exec-copy.sh $(url)
68 changes: 68 additions & 0 deletions archive/2022-10-04-DssSpell/Goerli-DssSpell.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
// SPDX-FileCopyrightText: © 2020 Dai Foundation <www.daifoundation.org>
// SPDX-License-Identifier: AGPL-3.0-or-later
//
// 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/>.

pragma solidity 0.6.12;
// Enable ABIEncoderV2 when onboarding collateral through `DssExecLib.addNewCollateral()`
// pragma experimental ABIEncoderV2;

import "dss-exec-lib/DssExec.sol";
import "dss-exec-lib/DssAction.sol";

import { DssSpellCollateralAction } from "./Goerli-DssSpellCollateral.sol";

interface GemLike {
function approve(address, uint256) external returns (bool);
}

interface RwaUrnLike {
function lock(uint256) external;
}

contract DssSpellAction is DssAction, DssSpellCollateralAction {

// Provides a descriptive tag for bot consumption
string public constant override description = "Goerli Spell";

// 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
//

function officeHours() public override returns (bool) {
return false;
}

function actions() public override {
// ---------------------------------------------------------------------
// Includes changes from the DssSpellCollateralAction
onboardNewCollaterals();

// lock RWA007 Token in the URN
GemLike(RWA007).approve(RWA007_A_URN, 1 * WAD);
RwaUrnLike(RWA007_A_URN).lock(1 * WAD);

DssExecLib.setChangelogVersion("1.14.2");
}
}

contract DssSpell is DssExec {
constructor() DssExec(block.timestamp + 30 days, address(new DssSpellAction())) public {}
}
Loading