Skip to content

Commit

Permalink
[Contracts 1.1] Prospective Release of Contracts 1.1 (#2)
Browse files Browse the repository at this point in the history
* Add ability to configure dev fund split

* regenerate minter

* wip (#3)

Co-authored-by: Keefer Taylor <keefer@keefertaylor.com>

* [Contracts 1.1] Remove ovenMax Parameter  (#4)

* remove ovenmax

* recompile

Co-authored-by: Keefer Taylor <keefer@keefertaylor.com>

* [Contracts 1.1] Decompose `updateParams` Entrypoint (#5)

* decompose

* decompose

Co-authored-by: Keefer Taylor <keefer@keefertaylor.com>

* process liquidations (#6)

Co-authored-by: Keefer Taylor <keefer@keefertaylor.com>

* Revert "process liquidations (#6)" (#7)

This reverts commit 3e2e260.

* [Contracts 1.1] Restrict Liquidations to the Liquidity Pool in Most Circumstances  (#11)

* process liquidations

* add fake liquidity pool

Co-authored-by: Keefer Taylor <keefer@keefertaylor.com>

* Deploy Scripts for v1.1 (#9)

* wip

* wip

* more wip

* work work

* work in progress

* end to end

* cleanup files

Co-authored-by: Keefer Taylor <keefer@keefertaylor.com>

* [Contracts 1.1] Update API to Use Threshold (#16)

* Fix API

* removed cached smartpy

Co-authored-by: Keefer Taylor <keefer@keefertaylor.com>

* [Contracts 1.1] Remove Accidentally Committed SmartPy Artifacts (#17)

* remove accidentally committed smartpy files

* update gitignore

Co-authored-by: Keefer Taylor <keefer@keefertaylor.com>

* Fix some final nits (#18)

* fix a few nits

* fix substitution

Co-authored-by: Keefer Taylor <keefer@keefertaylor.com>

Co-authored-by: Keefer Taylor <keefer@keefertaylor.com>
  • Loading branch information
keefertaylor and Keefer Taylor authored Oct 7, 2021
1 parent d33e0a4 commit a07449e
Show file tree
Hide file tree
Showing 29 changed files with 13,180 additions and 4,516 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
migrations/*/src/config.ts
migrations/*/deploy-data.json
node_modules/
smart_contracts/smartpy_out
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "multisig-timelock"]
path = multisig-timelock
url = https://github.com/hover-labs/multisig-timelock
[submodule "break-glass-contracts"]
path = break-glass-contracts
url = https://github.com/hover-labs/break-glass-contracts
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

- `deploy/`: NPM package to deploy the system.
- `smart_contracts/`: SmartPy Smart Contracts and compiled michelson code

- `migrations/`: Migrtion tools for moving between contract versions
1 change: 1 addition & 0 deletions break-glass-contracts
Submodule break-glass-contracts added at 9928bf
95 changes: 95 additions & 0 deletions migrations/contracts-1.1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Description

This script migrates contracts to the Contracts 1.1 branch (`keefertaylor/contracts-1.1`)

## Runbooks

### Testnet

**Ensure up to date and clean checkout**
```
$ git pull
$ git status
```

**Ensure correct SmartPy Version**

```
sh <(curl -s https://smartpy.io/releases/20210708-4662b0f8b1fe2186a243078f9f1ba0a4aa1c6f16/cli/install.sh)
```

**Remove any stale data**
```
npm run install-submodules
rm -f src/config.ts deploy-data.json
```

**Reset Sandbox**

Use the Discord bot!

**Run Migration**
```
export DEPLOY_SK=esdk...
cp src/config.sandbox.ts src/config.ts
ts-node src/flows/migrate.ts
```

**Validate Results**

Note: This action is destructive and the contract should not be used in production.

```
ts-node src/verifications/verify-storage.ts
ts-node src/verifications/verify-dao-and-break-glass.ts
```

**Generate Governance Lambda**
```
ts-node src/flows/generate-governance-lambda.ts
```

**Validation**

Validate the following in [the sandbox](https://sandbox.kolibri.finance/):
- A new oven can be created (tests that oven factory is wired correctly)
- New kUSD can be minted from the oven (tests that oven proxy and token are wired correctly)


### Mainnet

**Ensure up to date and clean checkout**
```
$ git pull
$ git status
```

**Ensure correct SmartPy Version**

```
sh <(curl -s https://smartpy.io/releases/20210708-4662b0f8b1fe2186a243078f9f1ba0a4aa1c6f16/cli/install.sh)
```

**Remove any stale data**
```
npm run install-submodules
rm -f src/config.ts deploy-data.json
```

**Run Migration**
```
export DEPLOY_SK=esdk...
cp src/config.mainnet.ts src/config.ts
ts-node src/flows/migrate.ts
```

**Validate Results**

```
ts-node src/verifications/verify-storage.ts
```

**Generate Governance Lambda**
```
ts-node src/flows/generate-governance-lambda.ts
```
Loading

0 comments on commit a07449e

Please sign in to comment.